Permalink
Browse files

Only throw dragstart event if there was movement

  • Loading branch information...
Koen Bok
Koen Bok committed Feb 8, 2016
1 parent c32e406 commit 4cae87fa6fb6bc937cf92d11c57e65c967b7e5ba
Showing with 4 additions and 4 deletions.
  1. +4 −4 framer/LayerDraggable.coffee
@@ -164,8 +164,6 @@ class exports.LayerDraggable extends BaseClass
@_point = @_correctedLayerStartPoint
@_ignoreUpdateLayerPosition = false
@emit(Events.DragStart, event)
_touchMove: (event) =>
return unless @enabled
@@ -225,8 +223,10 @@ class exports.LayerDraggable extends BaseClass
# Update the dragging status
if point.x isnt @_layerStartPoint.x or point.y isnt @_layerStartPoint.y
@_isDragging = true
@_isMoving = true
if not @_isDragging
@_isDragging = true
@_isMoving = true
@emit(Events.DragStart, event)
# Move literally means move. If there is no movement, we do not emit.
if @isDragging

0 comments on commit 4cae87f

Please sign in to comment.