Permalink
Browse files

Cancelling panStart and panEnd when dragging is not enabled

Fixes #568
  • Loading branch information...
nvh committed Feb 23, 2018
1 parent f32dd1f commit 12062937fa55e11d256dc093d39db05026d08ea3
Showing with 4 additions and 0 deletions.
  1. +4 −0 framer/LayerDraggable.coffee
@@ -144,6 +144,8 @@ class exports.LayerDraggable extends BaseClass
@_point = @layer.point
_panStart: (event) =>
return unless @enabled
LayerDraggable._globalDidDrag = false
Events.wrap(document).addEventListener(Gestures.Pan, @_panMove)
@@ -274,6 +276,8 @@ class exports.LayerDraggable extends BaseClass
@_panEnd(event)
_panEnd: (event) =>
return unless @enabled
LayerDraggable._globalDidDrag = false
Events.wrap(document).removeEventListener(Gestures.Pan, @_panMove)

0 comments on commit 1206293

Please sign in to comment.