Verwendung

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>;

Typdeklaration

ts
export interface TouchLocation extends TouchPayload {}

Mitglieder 4

NameTypErforderlichBeschreibung
locationXnumberJa—
locationYnumberJa—
pageXnumberJa—
pageYnumberJa—
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.