Skip to content

Commit ae6daac

Browse files
committed
Avoid collision check of node with itself. Fixes #586
1 parent c1c4ff8 commit ae6daac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/gridstack.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@
233233
var newY = n.y;
234234
while (newY >= n._origY) {
235235
var collisionNode = _.chain(this.nodes)
236+
.take(i)
236237
.find(_.bind(Utils._didCollide, {n: n, newY: newY}))
237238
.value();
238239

0 commit comments

Comments
 (0)