Skip to content
Permalink
Browse files

Fix overdrag disabled

  • Loading branch information...
koenbok committed Feb 3, 2016
1 parent dbec9ae commit 74b8b3b75a717c453b471d8ea2bca971284c257d
Showing with 9 additions and 0 deletions.
  1. +9 −0 framer/LayerDraggable.coffee
@@ -182,6 +182,15 @@ class exports.LayerDraggable extends BaseClass
y: touchEvent.clientY
t: Date.now() # We don't use timeStamp because it's different on Chrome/Safari

# Disable constraints drag if overdrag is disabled
if @overdrag is false
# TODO: We still need to account for the cursor offset here
frame = Utils.convertFrameToContext(@constraints, @layer, true, false)
return if event.point.x < Utils.frameGetMinX(frame)
return if event.point.x > Utils.frameGetMaxX(frame)
return if event.point.y < Utils.frameGetMinY(frame)
return if event.point.y > Utils.frameGetMaxY(frame)

point = _.clone(@_point)

scaleX = (1 / @layer.canvasScaleX() * @layer.scale * @layer.scaleX)

0 comments on commit 74b8b3b

Please sign in to comment.
You can’t perform that action at this time.