From ae6daac248580c9e5e2b486c25ca0d0718b50ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kr=C3=BCger?= Date: Wed, 11 Jan 2017 23:21:17 +0100 Subject: [PATCH] Avoid collision check of node with itself. Fixes #586 --- src/gridstack.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gridstack.js b/src/gridstack.js index 39d250a..f660de6 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -233,6 +233,7 @@ var newY = n.y; while (newY >= n._origY) { var collisionNode = _.chain(this.nodes) + .take(i) .find(_.bind(Utils._didCollide, {n: n, newY: newY})) .value();