Pointer
Detect pointer events to initiate drag and drop operations.
The Pointer sensor responds to Pointer events. It is the default sensors used by the DragDropManager if none are defined.
Pointer events are DOM events that are fired for a pointing device. They are designed to create a single DOM event model to handle pointing input devices such as a mouse, pen/stylus or touch (such as one or more fingers).
The pointer is a hardware-agnostic device that can target a specific set of screen coordinates. Having a single event model for pointers can simplify creating Web sites and applications and provide a good user experience regardless of the user’s hardware.
Source: MDN
Usage
API Reference
Options
The PointerSensor
accepts the following options:
The Pointer sensor supports two types activation constraints, distance
and delay
.
These activation constraints are not mutually exclusive, they can be used simultaneously.
In case both constraints are used, the Pointer sensor will activate as soon as one of the constraints is met.