TouchLocation
Where a touch landed: in the view (location) and on screen (page), in points.
Utilisation
Read a touch in local and screen coordinates.
// Read a touch in local and screen coordinates.
import { Pressable, Text, signal, type TouchLocation } from 'kuito';
const lastTouch = signal<TouchLocation | null>(null);
// Where the press started, in the view and on screen, for a popover to point at.
<Pressable
onPressStart={(event) => (lastTouch.value = event)}
onPress={() => console.log(lastTouch.value?.pageY)}
>
<Text>Share</Text>
</Pressable>;Déclaration du type
export interface TouchLocation extends TouchPayload {}Membres 4
| Nom | Type | Requis | Description |
|---|---|---|---|
locationX | number | Oui | — |
locationY | number | Oui | — |
pageX | number | Oui | — |
pageY | number | Oui | — |
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.