From 4bcfe9ed5ea053755caf0012a7eaf067fd5f0758 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Sun, 15 Dec 2024 17:42:46 +0100 Subject: [PATCH] draggingOver --- .../osparc/dashboard/WorkspacesAndFoldersTreeItem.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/WorkspacesAndFoldersTreeItem.js b/services/static-webserver/client/source/class/osparc/dashboard/WorkspacesAndFoldersTreeItem.js index 646b5fa7a8c..96ee093befd 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/WorkspacesAndFoldersTreeItem.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/WorkspacesAndFoldersTreeItem.js @@ -87,6 +87,7 @@ qx.Class.define("osparc.dashboard.WorkspacesAndFoldersTreeItem", { __attachDropHandlers: function() { this.setDroppable(true); + let draggingOver = false; this.addListener("dragover", e => { const workspaceDestId = this.getModel().getWorkspaceId(); const folderDestId = this.getModel().getFolderId(); @@ -95,13 +96,23 @@ qx.Class.define("osparc.dashboard.WorkspacesAndFoldersTreeItem", { } else if (e.supportsType("osparc-moveFolder")) { osparc.dashboard.DragDropHelpers.moveFolder.dragOver(e, this, workspaceDestId, folderDestId); } + + draggingOver = true; + setTimeout(() => { + if (draggingOver) { + this.setOpen(true); + draggingOver = false; + } + }, 1000); }); this.addListener("dragleave", () => { osparc.dashboard.DragDropHelpers.dragLeave(this); + draggingOver = false; }); this.addListener("dragend", () => { osparc.dashboard.DragDropHelpers.dragLeave(this); + draggingOver = false; }); this.addListener("drop", e => {