Default constructor.
The HTML element to track.
The callback to call when a long press occurred.
Optional callback to call on a tap, i.e. when the press ends before the specified timeout.
Mouse button id that should be handled by this event.
The HTML element to track.
If the cursor moves more than the given number of pixels, it is not a long-press, but a pan.
The callback to call when a long press occurred.
Optional callback to call on a tap, i.e. when the press ends before the specified timeout.
How long to wait (in ms) until a press is considered a long press.
Removes all events listeners. No more events will be sent.
Generated using TypeDoc
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).