PanGesture
The gesture pan() makes, with x and y translation sources that motion values follow.
Utilização
Type a shared gesture callback.
Este tipo é usado por 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 })]} />;Declaração do tipo
export interface PanGesture extends Gesture {
/** Its translation, added to where the follower was when it activated. */
readonly x: GestureSource;
readonly y: GestureSource;
}Membros 9
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
xsó de leitura | GestureSource | Sim | Its translation, added to where the follower was when it activated. |
ysó de leitura | GestureSource | Sim | — |
typesó de leitura | GestureType | Sim | — |
kindsó de leitura | GestureKind | Sim | — |
configsó de leitura | Readonly<Record<string, unknown>> | Sim | — |
callbackssó de leitura | Readonly<Callbacks<never, never>> | Sim | — |
releasingsó de leitura | Animation<unknown> | Não | How the motion values following it let go when it ends. |
release | (animation: Animation<unknown>) => PanGesture | Sim | 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. |
activesó de leitura | GestureSource | Sim | 1 while it is active, 0 otherwise. |
release — assinaturas de método
Assinaturas
(animation: Animation<unknown>): PanGestureParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
animation | Animation<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.