TouchesGesture
A touches() gesture, a pan from the first touch, whose x and y are where the finger is in the view.
Utilização
Track raw touch movement over a drawing surface.
Este tipo é usado por 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" />;
}Declaração do tipo
export interface TouchesGesture extends Gesture {
/** Where the finger is in the view. */
readonly x: GestureSource;
readonly y: GestureSource;
}Membros 9
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
xsó de leitura | GestureSource | Sim | Where the finger is in the view. |
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>) => TouchesGesture | 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>): TouchesGestureParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
animation | Animation<unknown> | Sim | — |
Devolve
TouchesGesture
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.