Commit d071c13d authored by bbaer's avatar bbaer
Browse files

don't generate useless dropareas

parent 457e5f63
......@@ -163,8 +163,11 @@ var QfqNS = QfqNS || {};
this.removeDropAreas();
if ($object[0].id !== this.draggedId) {
var $dropArea = this.buildDropArea("before", $object.data("dnd-id"), $object.data("dnd-position"));
$object.before($dropArea);
if ($object.data("dnd-position") !== $("#" + this.draggedId).data("dnd-position") + 1) {
var $dropArea = this.buildDropArea("before", $object.data("dnd-id"), $object.data("dnd-position"));
$object.before($dropArea);
}
if ($object[0].id === this.lastChild) {
var $lastDrop = this.buildDropArea("after", $object.data("dnd-id"), $object.data("dnd-position"));
$lastDrop.appendTo(this.$container);
......
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