TouchesOptions
Sets a touches() gesture's callbacks, and when and where it takes touches.
Verwendung
Track raw touch movement over a drawing surface.
Dieser Typ wird verwendet von touches
// Track raw touch movement over a drawing surface.
import { Box, touches } from 'kuito';
export function TouchSurface() {
const input = touches({ onChange: (event) => console.log(event.changeX, event.changeY) });
return <Box gestures={[input]} width={240} height={240} backgroundColor="#e2e8f0" />;
}Typdeklaration
export type TouchesOptions = Common & Callbacks<PanEvent, PanChangeEvent>;Mitglieder 5
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
disabled | boolean | Nein | Ignores touches, like a disabled Pressable. |
hitArea | HitArea | Nein | Insets of the area that takes touches: one for every edge, or by edge. |
onStart | (event: PanEvent) => void | Nein | It activated. |
onChange | (event: PanChangeEvent) => void | Nein | It moved, with the change since the last move. |
onEnd | (event: PanEvent, success: boolean) => void | Nein | It ended after activating: success is false when it was cancelled. |
onStart — Methodensignaturen
Signaturen
onChange — Methodensignaturen
Signaturen
(event: PanChangeEvent): voidParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
event | PanChangeEvent | Ja | — |
Rückgabe
void
onEnd — Methodensignaturen
Signaturen
(event: PanEvent, success: boolean): voidParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
event | PanEvent | Ja | — |
success | boolean | Ja | — |
Rückgabe
void
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.