How to calculate scroll velocity?

2.2k Views Asked by At

I've got a simple graph people can drag the position by drag and drop with the mouse. Currently it stops instantly as soon as the person stops touching but I want to achieve a similar effect as when you scroll through your phone. Keep the velocity as soon as the user lets go, decelerate until it stops.

How do I calculate this.

0

There are 0 best solutions below