touchmove

Commons
stable

Handle the `touchmove` phase of a gesture: record the current pointer X/Y coordinates and call the optional `move` callback on the wrapper.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

event
requis
TouchEvent
The native TouchEvent. `changedTouches[0]` is read for the current position.
wrapper
requis
TTouchWrapper
The shared gesture state object. `touchmoveX` and `touchmoveY` are written; `wrapper.move` is called when defined.

API

Valeur de retour

La valeur retournée par cet util.

Side-effectful — mutates the wrapper and calls the optional move callback. Returns nothing.

Usage

Exemples

Extraits de code prêts à coller.

Track pointer position during a drag

typescript