PanGesture
The gesture pan() makes, with x and y translation sources that motion values follow.
Verwendung
Type a shared gesture callback.
Dieser Typ wird verwendet von pan
// Type a shared gesture callback.
import { Box, pan, tap, type GestureEvent } from 'kuito';
// Any gesture's event carries how many fingers it involves.
const logFingers = (event: GestureEvent) => console.log(`${event.numberOfPointers} finger(s)`);
<Box gestures={[tap({ onEnd: logFingers }), pan({ onStart: logFingers })]} />;Typdeklaration
export interface PanGesture extends Gesture {
/** Its translation, added to where the follower was when it activated. */
readonly x: GestureSource;
readonly y: GestureSource;
}Mitglieder 9
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
xschreibgeschützt | GestureSource | Ja | Its translation, added to where the follower was when it activated. |
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>) => PanGesture | 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>): PanGestureParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
animation | Animation<unknown> | Ja | — |
Rückgabe
PanGesture
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.