GestureView
Pan, pinch, long-press, double-tap, and scroll-wheel for PWAs. The loader stays small: gestures live in the lazy ui.js chunk.
LIVE
<GestureView>
view!
view! {
<GestureView
preferredPan="horizontal"
panThreshold={10}
onPan={js! { state.dx.set(event.detail.dx); }}
onLongPress={js! { state.held.set(true); }}
onDoubletap={js! { /* … */ }}
onPinch={js! { state.scale.set(event.detail.scale); }}
onScrollwheel={js! { /* event.detail.dx / dy */ }}
>
<canvas />
</GestureView>
}preferredPan is horizontal or vertical (lock the other axis until the threshold). panThreshold defaults to 10px.
Handlers compile to data-r-on:pan etc. They are not in the loader event list — ui.js calls __resuma.runHandler after detecting the gesture.