Skip to content
Permalink
Browse files

only snap to page if pagecomponent did not move

  • Loading branch information...
J.P.P Treub J.P.P Treub
J.P.P Treub authored and J.P.P Treub committed Jul 21, 2015
1 parent c181296 commit effb39956b448a7197904ef4f86da8b2c8feca17
@@ -3,7 +3,7 @@
"sharedPrototype" : 1,
"deviceOrientation" : 0,
"contentScale" : 1,
"deviceType" : "fullscreen",
"deviceType" : "iphone-6-silver-hand",
"updateDelay" : 0.3,
"deviceScale" : -1,
"delay" : 0.3
@@ -165,7 +165,13 @@ class exports.PageComponent extends ScrollComponent

if Math.max(Math.abs(velocity.x), Math.abs(velocity.y)) < @velocityThreshold or xLock or yLock or xDisabled or yDisabled
# print "velocity"
@snapToPage(@closestPage, true, @animationOptions)

start = @content.draggable._layerStartPoint
end = @content.draggable.layer.point

if start.x != end.x || start.y != end.y
@snapToPage(@closestPage, true, @animationOptions)

return

# Figure out which direction we are scrolling to and make a sorted list of

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit effb399

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