flywave-map-controls.longpresshandler
Home > @flywave/flywave-map-controls > LongPressHandler
LongPressHandler class
Class that can be used to track long presses on an HTML Element. A long press is a press that lasts a minimum duration (see the [[timeout]] member) while the pointer is not moved more than a certain threshold (see the [[moveThreshold]] member).
Signature:
export declare class LongPressHandler
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Default constructor. |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
number | Mouse button id that should be handled by this event. | ||
| HTMLElement | ||
number | If the cursor moves more than the given number of pixels, it is not a long-press, but a pan. | ||
(event: MouseEvent | Touch) => void | |||
(event: MouseEvent | Touch) => void | (Optional) | ||
number | How long to wait (in ms) until a press is considered a long press. |
Methods
Method | Modifiers | Description |
|---|---|---|
Removes all events listeners. No more events will be sent. |