createHandlers
Commons
stable
Builds the internal touch-event handler map (touchstart, touchend, touchmove) from a set of directional callbacks. Used by the v-touch directive to bridge raw touch events with high-level swipe/drag gestures.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- valueITouchHandlers{}
- An object of optional directional callbacks: left, right, up, down, start, move, end.
API
Return value
The value returned by this util.
- An object with touchstart, touchend, and touchmove native event handlers ready to be bound to a DOM element.
Usage
Examples
Ready-to-paste usage snippets.
Build touch handlers for swipe detection