I'm building a button number that increases or decreases the time on the slide of the finger. If you move to the right add, if you change direction and backwards ... subtract.
I'm trying, therefore, to recover the delta from a touch action. Failing.
In the mouse version is simple, enough:
if (event.movementX> 0) {delta = true; //so add}
else if (event.movementX <0) {delta = false; //so subtract }
but there is no movementX on the touch.
it is not possible to use event.touches[0].clientX - start
because it does not report the change of direction (left <-> right) of the event and is therefore always true.
ideas? thank you.