Verwendung

Type a shared gesture callback.

Dieser Typ wird verwendet von pan

tsx
// 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

ts
export interface PanGesture extends Gesture {
  /** Its translation, added to where the follower was when it activated. */
  readonly x: GestureSource;
  readonly y: GestureSource;
}

Mitglieder 9

NameTypErforderlichBeschreibung
xschreibgeschütztGestureSourceJaIts translation, added to where the follower was when it activated.
yschreibgeschütztGestureSourceJa—
typeschreibgeschütztGestureTypeJa—
kindschreibgeschütztGestureKindJa—
configschreibgeschütztReadonly<Record<string, unknown>>Ja—
callbacksschreibgeschütztReadonly<Callbacks<never, never>>Ja—
releasingschreibgeschütztAnimation<unknown>NeinHow the motion values following it let go when it ends.
release(animation: Animation<unknown>) => PanGestureJaThe 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ütztGestureSourceJa1 while it is active, 0 otherwise.
release — Methodensignaturen

Signaturen

ts
(animation: Animation<unknown>): PanGesture

Parameter

NameTypErforderlichBeschreibung
animationAnimation<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.