Skip to content

Commit

Permalink
Locked items did not respected their positions when external items we…
Browse files Browse the repository at this point in the history
…re dropped.
  • Loading branch information
aletorrado committed Apr 23, 2016
1 parent efb49d2 commit 5e71f4b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/gridstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@
node._added = true;

node.el = el;
node.autoPosition = true;
node.x = x;
node.y = y;
self.grid.cleanNodes();
Expand All @@ -733,13 +734,12 @@
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({
Expand Down

0 comments on commit 5e71f4b

Please sign in to comment.