textmode.js / Textmodifier / swipe
Method: swipe()
ts
swipe(callback): void;Register a callback for swipe gestures.
Swipes provide a normalised direction vector, travelled distance, and velocity in CSS pixels per millisecond. Useful for panning, flicks, or quick shortcuts.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | TouchSwipeHandler | Handler to run when a swipe gesture is detected. |
Returns
void