Skip to content
Snippets Groups Projects
Commit 457e5f63 authored by bbaer's avatar bbaer
Browse files

preventing from bleeding into other dnd-sorts on the same page

parent 8b708bd1
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ var QfqNS = QfqNS || {};
this.eventEmitter = new EventEmitter();
this.dropZones = [];
this.elements = [];
this.active = false;
this.api = $hook.data("dnd-api");
this.draggedId = "";
this.lastChild = "";
......@@ -195,13 +196,16 @@ var QfqNS = QfqNS || {};
child.on("dragstart", function(e) {
e.originalEvent.dataTransfer.setData("text", child[0].id);
that.draggedId = child[0].id;
that.active = true;
e.originalEvent.dataTransfer.effectAllowed = "move";
});
child.on("dragenter", function(e) {
that._buildOrderDropZones($(this), e);
if (that.active) {
that._buildOrderDropZones($(this), e);
}
});
child.on("dragend", function() {
that.active = false;
that.removeDropAreas();
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment