Locked items did not respected their positions when external items were dropped.

This commit is contained in:
Alejandro Torrado 2016-04-23 17:20:58 -03:00
commit 5e71f4bd0d

View file

@ -715,6 +715,7 @@
node._added = true;
node.el = el;
node.autoPosition = true;
node.x = x;
node.y = y;
self.grid.cleanNodes();
@ -732,14 +733,13 @@
node._beforeDragX = node.x;
node._beforeDragY = node.y;
self._updateContainerHeight();
} else {
if (!self.grid.canMoveNode(node, x, y)) {
return;
}
self.grid.moveNode(node, x, y);
self._updateContainerHeight();
}
if (!self.grid.canMoveNode(node, x, y)) {
return;
}
self.grid.moveNode(node, x, y);
self._updateContainerHeight();
};
$(self.container).droppable({