Closed eHallberg closed 5 years ago
Good catch, make a PR and check if the tests passes. It's obviously something wack when calculating the distance.
@fisshy Done
It is still the case. scrollToBottom
is way faster than scrollToTop
given the same duration
I was about to implement a scroll that is ran on interval (overview page) so that it would scroll to bottom and then scroll to top with pretty long duration (15s). I quickly found that the scroll speed was not the same between them, in fact scrollToBottom was running faster then scrollToTop.
What i found was that the calculations for scrollToTop is correct, it can't really fail since it is
y=0
. scrollToBottom is using a function to calculate the distance to scroll with this function (I have placed comments where i changed the code):This is how i am using this plugin: