Optionalprops: IPointersStaticProps & IPointersMutableProps & Partial<OptionalonCallbacks: Partial<Retrieves the module's callbacks instance.
Returns the container element handling events.
Checks if the module has been destroyed.
Indicates whether the start event has been triggered.
Move data
The name of the module, derived from the class name
Returns the map of active pointers.
Optional prefix for classnames used by the module
Current properties. Do not mutate these directly, use updateProps instead.
Protected_addAdds a class name on an element, and keeps track of it for removal when the module is destroyed.
The target DOM element.
The class name to toggle.
Protected_cnHelper function to generate classnames with the module's prefix.
The class names to generate.
A string of class names with the module's prefix applied.
Protected_destroyDestroys the component and removes all event listeners.
Returns the default static properties.
Determines which mouse buttons trigger events.
See MouseEvent.button.
The element that listens for pointer events.
Ensure the element has the appropriate touch-action property to prevent conflicts with browser gestures.
Disable user selection on drag.
Maximum number of pointers that can be tracked simultaneously.
Minimum number of active pointers required to trigger the "start" callback.
Calculate coordinates relative to the container.
Protected_handleMethod that is called when the module's properties mutate. In most cases, used to handle callbacks.
Destroys the module, cleaning up resources, callbacks, and event listeners.
Adds a custom callback to the module.
The event type to listen for (e.g., 'props', 'destroy').
The function to execute when the event is triggered.
Additional settings for the callback.
Adds a callback on the module's destruction.
The function to execute during destruction.
Manages pointer events, including tracking multiple pointers, and emitting callbacks for pointer interactions.
For proper functionality, ensure the container has an appropriate touch-action property.
Documentation