TouchesOptions
Sets a touches() gesture's callbacks, and when and where it takes touches.
Utilisation
Track raw touch movement over a drawing surface.
Ce type est utilisé par 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" />;
}Déclaration du type
export type TouchesOptions = Common & Callbacks<PanEvent, PanChangeEvent>;Membres 5
| Nom | Type | Requis | Description |
|---|---|---|---|
disabled | boolean | Non | Ignores touches, like a disabled Pressable. |
hitArea | HitArea | Non | Insets of the area that takes touches: one for every edge, or by edge. |
onStart | (event: PanEvent) => void | Non | It activated. |
onChange | (event: PanChangeEvent) => void | Non | It moved, with the change since the last move. |
onEnd | (event: PanEvent, success: boolean) => void | Non | It ended after activating: success is false when it was cancelled. |
onStart — signatures de méthode
Signatures
onChange — signatures de méthode
Signatures
(event: PanChangeEvent): voidParamètres
| Nom | Type | Requis | Description |
|---|---|---|---|
event | PanChangeEvent | Oui | — |
Retourne
void
onEnd — signatures de méthode
Signatures
(event: PanEvent, success: boolean): voidParamètres
| Nom | Type | Requis | Description |
|---|---|---|---|
event | PanEvent | Oui | — |
success | boolean | Oui | — |
Retourne
void
Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.