Permalink
Browse files

Fix constrained draggable

  • Loading branch information...
koenbok committed Jan 28, 2016
1 parent 719b8d5 commit 4581bf21dda8b1c8ff42a9b055a7a29c1762dd91
Showing with 3 additions and 2 deletions.
  1. +3 −2 framer/LayerDraggable.coffee
@@ -186,6 +186,8 @@ class exports.LayerDraggable extends BaseClass
point.x = @_point.x + (event.delta.x * scaleX) if @horizontal
point.y = @_point.y + (event.delta.y * scaleY) if @vertical
@_point = _.clone(point)
# Constraints and overdrag
point = @_constrainPosition(point, @_constraints, @overdragScale) if @_constraints
@@ -207,8 +209,7 @@ class exports.LayerDraggable extends BaseClass
if @isDragging
@emit(Events.DragWillMove, event)
@_point = _.clone(point)
# Align every drag to pixels
if @pixelAlign
point.x = parseInt(point.x) if @horizontal
point.y = parseInt(point.y) if @vertical

0 comments on commit 4581bf2

Please sign in to comment.