A
A
Alexey Rahe2019-09-30 02:20:29
JavaScript
Alexey Rahe, 2019-09-30 02:20:29

How to calculate kinetic scroll without a sea of ​​timeouts?

There is parallax, and if the touch-scroll itself is more or less processed by a set of touchend, touchstart, touchcancel, touchmove events, then the situation “touched with a finger, quickly pulled and immediately released, and the screen scrolled by inertia” is not processed correctly for me.
From clumsy methods, of course, the interval on touchstart comes to mind, but it seems to me an ugly solution
. Maybe I'm digging somewhere in the wrong place?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2019-09-30
@xmoonlight

Here is a finished example . Should help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question