ITouchHandlers
interface
Touch & Gesture
Named callback map for the v-touch directive — one optional handler per lifecycle event (start, end, move) and per swipe direction (left, right, up, down).
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- start(wrapperEvent: { originalEvent: TouchEvent } & ITouchData) => void
- Called when a touch gesture starts.
- end(wrapperEvent: { originalEvent: TouchEvent } & ITouchData) => void
- Called when a touch gesture ends.
- move(wrapperEvent: { originalEvent: TouchEvent } & ITouchData) => void
- Called on every touchmove event.
- left(wrapper: ITouchData) => void
- Called when the gesture is recognised as a leftward swipe.
- right(wrapper: ITouchData) => void
- Called when the gesture is recognised as a rightward swipe.
- up(wrapper: ITouchData) => void
- Called when the gesture is recognised as an upward swipe.
- down(wrapper: ITouchData) => void
- Called when the gesture is recognised as a downward swipe.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Using swipe direction handlers with v-touch