consider the scrolling speed during scrolling

This commit is contained in:
Marco Martin 2015-06-15 11:15:25 -07:00
parent b16b234493
commit 67f73f1e0e

View file

@ -390,8 +390,10 @@ MouseEventListener {
}
}
onDraggingVerticallyChanged: {
//(1000/scrollAnim.duration) is the length scrolled at the current speed in the duration of the animation
if (!draggingVertically && contentY < -headerItem.height + root.height) {
scrollAnim.to = Math.round(contentY/root.height) * root.height
scrollAnim.to = Math.round((contentY + (verticalVelocity / (1000/scrollAnim.duration))) / root.height) * root.height
scrollAnim.running = true;
}
}