Usage

Read a touch in local and screen coordinates.

tsx
// 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

ts
export interface TouchLocation extends TouchPayload {}

Members 4

NameTypeRequiredDescription
locationXnumberYes—
locationYnumberYes—
pageXnumberYes—
pageYnumberYes—
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.