Permalink
Browse files

Fixed leaky x, y variable refs in animation function

  • Loading branch information...
1 parent 8299c67 commit d3ca4237f2727360f006b65dcb667edc3c309039 @tapmodo committed Jun 26, 2012
Showing with 21 additions and 21 deletions.
  1. +4 −4 js/jquery.Jcrop.js
  2. +17 −17 js/jquery.Jcrop.min.js
View
@@ -1340,8 +1340,8 @@
pcent = 0,
velocity = options.swingSpeed;
- x = animat[0];
- y = animat[1];
+ x1 = animat[0];
+ y1 = animat[1];
x2 = animat[2];
y2 = animat[3];
@@ -1355,8 +1355,8 @@
return function () {
pcent += (100 - pcent) / velocity;
- animat[0] = Math.round(x + ((pcent / 100) * ix1));
- animat[1] = Math.round(y + ((pcent / 100) * iy1));
+ animat[0] = Math.round(x1 + ((pcent / 100) * ix1));
+ animat[1] = Math.round(y1 + ((pcent / 100) * iy1));
animat[2] = Math.round(x2 + ((pcent / 100) * ix2));
animat[3] = Math.round(y2 + ((pcent / 100) * iy2));
Oops, something went wrong.

0 comments on commit d3ca423

Please sign in to comment.