TouchesOptions
Sets a touches() gesture's callbacks, and when and where it takes touches.
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 type TouchesOptions = Common & Callbacks<PanEvent, PanChangeEvent>;Membros 5
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
disabled | boolean | Não | Ignores touches, like a disabled Pressable. |
hitArea | HitArea | Não | Insets of the area that takes touches: one for every edge, or by edge. |
onStart | (event: PanEvent) => void | Não | It activated. |
onChange | (event: PanChangeEvent) => void | Não | It moved, with the change since the last move. |
onEnd | (event: PanEvent, success: boolean) => void | Não | It ended after activating: success is false when it was cancelled. |
onStart — assinaturas de método
Assinaturas
onChange — assinaturas de método
Assinaturas
(event: PanChangeEvent): voidParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
event | PanChangeEvent | Sim | — |
Devolve
void
onEnd — assinaturas de método
Assinaturas
(event: PanEvent, success: boolean): voidParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
event | PanEvent | Sim | — |
success | boolean | Sim | — |
Devolve
void
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.