UNPKG

@edgeworkscreative/st-press

Version:

Adds the `onPress` event to your Stencil app. Press is recognized when the pointer is down for 251ms without any movement.

17 lines (16 loc) 449 B
interface StencilGlobalHTMLAttributes { 'onPress'?: (event: CustomEvent<void>) => void; } declare class PressEvents { private time; private threshold; private hasStarted; private startX; private startY; private moveX; private moveY; constructor(time?: number, threshold?: number); onStart(ev: MouseEvent | TouchEvent): void; onEnd(): void; onMove(ev: MouseEvent | TouchEvent): void; }