Skip to content

Commit

Permalink
draggingOver
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz committed Dec 15, 2024
1 parent 5de4500 commit 4bcfe9e
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 => {
Expand Down

0 comments on commit 4bcfe9e

Please sign in to comment.