Permalink
Browse files

Fix draggable lockDirection bug

  • Loading branch information...
Koen Bok
Koen Bok committed Feb 5, 2016
1 parent 1bc5caa commit 71d886eccc7d1c638ad09d372401b22c1da768f4
Showing with 6 additions and 4 deletions.
  1. +1 −4 framer/Gestures.coffee
  2. +5 −0 framer/LayerDraggable.coffee
@@ -85,7 +85,4 @@ Gestures.Rotate = "rotate"
Gestures.RotateStart = "rotatestart"
Gestures.RotateEnd = "rotateend"
exports.Gestures = Gestures
exports.Gestures = Gestures
@@ -208,6 +208,11 @@ class exports.LayerDraggable extends BaseClass
# Direction lock
if @directionLock
if not @_directionLockEnabledX and not @_directionLockEnabledY
offset = event.offset
offset.x = offset.x * @speedX * (1 / @layer.canvasScaleX()) * @layer.scaleX * @layer.scale
offset.y = offset.y * @speedY * (1 / @layer.canvasScaleY()) * @layer.scaleY * @layer.scale
@_updatedirectionLock(offset)
return
else

0 comments on commit 71d886e

Please sign in to comment.