TouchLocation
Where a touch landed: in the view (location) and on screen (page), in points.
Utilização
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>;Declaração do tipo
export interface TouchLocation extends TouchPayload {}Membros 4
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
locationX | number | Sim | — |
locationY | number | Sim | — |
pageX | number | Sim | — |
pageY | number | Sim | — |
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.