TapOptions
Sets how many taps in a row a tap() gesture needs and how quick and still they must be, and its callbacks.
Utilização
Type a shared gesture callback.
Este tipo é usado por tap
// 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 TapOptions extends Common, Callbacks<TapEvent, TapEvent> {
/** Taps in a row: 2 for a double tap. */
count?: number;
maxDuration?: number;
maxDistance?: number;
}Membros 8
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
count | number | Não | Taps in a row: 2 for a double tap. |
maxDuration | number | Não | — |
maxDistance | number | Nã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: PositionEvent) => void | Não | It activated. |
onChange | (event: PositionEvent) => void | Não | It moved, with the change since the last move. |
onEnd | (event: PositionEvent, success: boolean) => void | Não | It ended after activating: success is false when it was cancelled. |
onStart — assinaturas de método
Assinaturas
(event: PositionEvent): voidParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
event | PositionEvent | Sim | — |
Devolve
void
onChange — assinaturas de método
Assinaturas
(event: PositionEvent): voidParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
event | PositionEvent | Sim | — |
Devolve
void
onEnd — assinaturas de método
Assinaturas
(event: PositionEvent, success: boolean): voidParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
event | PositionEvent | 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.