TouchLocation
Where a touch landed: in the view (location) and on screen (page), in points.
Verwendung
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>;Typdeklaration
export interface TouchLocation extends TouchPayload {}Mitglieder 4
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
locationX | number | Ja | — |
locationY | number | Ja | — |
pageX | number | Ja | — |
pageY | number | Ja | — |
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.