Utilização

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

Declaração do tipo

ts
export interface TouchLocation extends TouchPayload {}

Membros 4

NomeTipoObrigatórioDescrição
locationXnumberSim—
locationYnumberSim—
pageXnumberSim—
pageYnumberSim—
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.