TouchesGesture
A touches() gesture, a pan from the first touch, whose x and y are where the finger is in the view.
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 interface TouchesGesture extends Gesture {
/** Where the finger is in the view. */
readonly x: GestureSource;
readonly y: GestureSource;
}Mitglieder 9
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
xschreibgeschützt | GestureSource | Ja | Where the finger is in the view. |
yschreibgeschützt | GestureSource | Ja | — |
typeschreibgeschützt | GestureType | Ja | — |
kindschreibgeschützt | GestureKind | Ja | — |
configschreibgeschützt | Readonly<Record<string, unknown>> | Ja | — |
callbacksschreibgeschützt | Readonly<Callbacks<never, never>> | Ja | — |
releasingschreibgeschützt | Animation<unknown> | Nein | How the motion values following it let go when it ends. |
release | (animation: Animation<unknown>) => TouchesGesture | Ja | The same gesture, letting go with animation: each follower runs it with
the gesture's velocity, toward its own home (its first value) unless the
animation names a target. |
activeschreibgeschützt | GestureSource | Ja | 1 while it is active, 0 otherwise. |
release — Methodensignaturen
Signaturen
(animation: Animation<unknown>): TouchesGestureParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
animation | Animation<unknown> | Ja | — |
Rückgabe
TouchesGesture
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.