page.velocityThreshold < number>

The velocityThreshold influences the role velocity plays in snapping to a different page. Besides the scrolling distance, the PageComponent also takes your scrolling speed (velocity) into account.
velocityThreshold影响的速度在捕捉到不同的页面中发挥的作用。除了滚动距离,PageComponent也考虑到了你的滚动速度速度。

page = new PageComponent
page.velocityThreshold = 0.2

To better understand the effects of adjusting the velocityThreshold, you can print out your velocity after scrolling. If you want switching between pages to be based mostly on distance, increase the velocityThreshold.
译:为了更好地理解velocityThreshold调整的影响,在滚动后,你可以打印出您的速度。如果你想大多基于距离页面之间切换,增加velocityThreshold。

# Increase the velocityThreshold 
page.velocityThreshold = 5

# After switching between pages, print the velocity 
page.on Events.ScrollEnd, ->
    print Math.abs(page.velocity.x)

results matching ""

    No results matching ""