TouchLocation
Where a touch landed: in the view (location) and on screen (page), in points.
Usage
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>;Type declaration
export interface TouchLocation extends TouchPayload {}Members 4
| Name | Type | Required | Description |
|---|---|---|---|
locationX | number | Yes | — |
locationY | number | Yes | — |
pageX | number | Yes | — |
pageY | number | Yes | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.