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
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- eventrequiredTouchEvent
- The native TouchEvent. `changedTouches[0]` is read for the current position.
- wrapperrequiredTTouchWrapper
- The shared gesture state object. `touchmoveX` and `touchmoveY` are written; `wrapper.move` is called when defined.
API
Return value
The value returned by this util.
- Side-effectful — mutates the wrapper and calls the optional move callback. Returns nothing.
Usage
Examples
Ready-to-paste usage snippets.
Track pointer position during a drag