From da17af042d71a65b878b0e66becf0338444f9e41 Mon Sep 17 00:00:00 2001 From: Taye Adeyemi Date: Wed, 10 Dec 2014 21:07:40 +0000 Subject: [PATCH] Fix snap range bug --- interact.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interact.js b/interact.js index dd319b119..ea279362d 100644 --- a/interact.js +++ b/interact.js @@ -2657,7 +2657,8 @@ var range = target.range, dx, dy, - distance; + distance, + inRange; dx = target.x - page.x + this.snapOffset.x; dy = target.y - page.y + this.snapOffset.y; @@ -2696,8 +2697,7 @@ } } - var inRange, - snapChanged; + var snapChanged; if (closest.target) { status.snappedX = closest.target.x; @@ -2714,7 +2714,7 @@ status.dy = closest.dy; status.changed = (snapChanged || (closest.inRange && !status.locked)); - status.locked = inRange; + status.locked = closest.inRange; return status; },