Utilisation

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

Déclaration du type

ts
export interface TouchLocation extends TouchPayload {}

Membres 4

NomTypeRequisDescription
locationXnumberOui—
locationYnumberOui—
pageXnumberOui—
pageYnumberOui—
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.