Commit 457e5f63 authored by bbaer's avatar bbaer
Browse files

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

parent 8b708bd1
......@@ -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();
});
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment