Utilização

Type a shared gesture callback.

Este tipo é usado por 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 })]} />;

Declaração do tipo

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

Membros 9

NomeTipoObrigatórioDescrição
xsó de leituraGestureSourceSimIts translation, added to where the follower was when it activated.
ysó de leituraGestureSourceSim—
typesó de leituraGestureTypeSim—
kindsó de leituraGestureKindSim—
configsó de leituraReadonly<Record<string, unknown>>Sim—
callbackssó de leituraReadonly<Callbacks<never, never>>Sim—
releasingsó de leituraAnimation<unknown>NãoHow the motion values following it let go when it ends.
release(animation: Animation<unknown>) => PanGestureSimThe 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.
activesó de leituraGestureSourceSim1 while it is active, 0 otherwise.
release — assinaturas de método

Assinaturas

ts
(animation: Animation<unknown>): PanGesture

Parâmetros

NomeTipoObrigatórioDescrição
animationAnimation<unknown>Sim—

Devolve

PanGesture

Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.