FlingEvent
Where a fling started, in the view and on screen, for reacting to the swipe that triggered it.
Utilização
Read where a flick started.
// Read where a flick started.
import { Box, fling, signal, type FlingEvent } from 'kuito';
const dismissed = signal<'top' | 'bottom' | null>(null);
// A fling started near the top dismisses upward, else downward.
const dismiss = (event: FlingEvent) => {
dismissed.value = event.y < 100 ? 'top' : 'bottom';
};
<Box gestures={[fling({ direction: ['up', 'down'], onStart: dismiss })]} height={200} />;Declaração do tipo
export type FlingEvent = PositionEvent;Membros 7
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
x | number | Sim | — |
y | number | Sim | — |
absoluteX | number | Sim | — |
absoluteY | number | Sim | — |
state | number | Sim | — |
numberOfPointers | number | Sim | — |
pointerType | number | Sim | — |
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.