The scroll animation of the core-scroll component is tied to the screen refresh rate. This PR changes this to be tied to time instead, making the scroll speed consistent across different devices.
This PR replaces the friction attribute with a new duration attribute. The duration attribute takes a number in milliseconds representing how long the scroll animation should last.
I used an exponential easing function with a default duration of 500ms to match the previous default scroll animation as close as possible.
I know this is a breaking change, but I hope that this change is welcome :)
The scroll animation of the core-scroll component is tied to the screen refresh rate. This PR changes this to be tied to time instead, making the scroll speed consistent across different devices.
This PR replaces the
friction
attribute with a newduration
attribute. Theduration
attribute takes a number in milliseconds representing how long the scroll animation should last.I used an exponential easing function with a default duration of 500ms to match the previous default scroll animation as close as possible.
I know this is a breaking change, but I hope that this change is welcome :)