Skip to content

Commit

Permalink
Fix snap range bug
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Dec 10, 2014
1 parent 4b2c8f7 commit da17af0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions interact.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -2696,8 +2697,7 @@
}
}

var inRange,
snapChanged;
var snapChanged;

if (closest.target) {
status.snappedX = closest.target.x;
Expand All @@ -2714,7 +2714,7 @@
status.dy = closest.dy;

status.changed = (snapChanged || (closest.inRange && !status.locked));
status.locked = inRange;
status.locked = closest.inRange;

return status;
},
Expand Down

0 comments on commit da17af0

Please sign in to comment.