Permalink
Browse files

Fix draggable.momentum, less momentum tolerance

  • Loading branch information...
koenbok committed Apr 7, 2015
1 parent 64896a8 commit e6d5cda62dade9dd6b97ab5692fa78957ec4f310
Showing with 9 additions and 2 deletions.
  1. +1 −1 framer/Defaults.coffee
  2. +8 −1 framer/LayerDraggable.coffee
View
@@ -27,7 +27,7 @@ Originals =
momentum: true
momentumOptions:
friction: 2.1
tolerance: 10
tolerance: 1
bounce: true
bounceOptions:
friction: 40
@@ -467,8 +467,15 @@ class exports.LayerDraggable extends BaseClass
_startSimulation: ->
# The types of simulation that we can have are:
# 1) Momentum inside constraints
# 2) Momentum inside constraints to outside constraints bounce
# 3) Release outside constraints bounce
# 4) Momentum without constraints
return unless @momentum or @bounce
return if @isDragging is false and @isBeyondConstraints is false
return if @isBeyondConstraints is false and @momentum is false
return if @isBeyondConstraints is false and @isDragging is false
# If overdrag is disabled, we need to not have a bounce animation
# when the cursor is outside of the dragging bounds for an axis.

0 comments on commit e6d5cda

Please sign in to comment.