flywave-map-controls.longpresshandler._constructor_
Home > @flywave/flywave-map-controls > LongPressHandler > (constructor)
LongPressHandler.(constructor)
Default constructor.
Signature:
constructor(element: HTMLElement, onLongPress: (event: MouseEvent | Touch) => void, onTap?: (event: MouseEvent | Touch) => void);
Parameters
Parameter | Type | Description |
|---|---|---|
element | HTMLElement | The HTML element to track. |
onLongPress | (event: MouseEvent | Touch) => void | The callback to call when a long press occurred. |
onTap | (event: MouseEvent | Touch) => void | (Optional) Optional callback to call on a tap, i.e. when the press ends before the specified timeout. |