Optionalprops: TModuleProps<Retrieves the module's callbacks instance.
The element that listens for pointer events.
Indicates whether the instance has been destroyed.
After destruction, destroy is a no-op.
Whether the required number of pointers has been reached (start fired).
Latest aggregated gesture snapshot from the most recent move update,
or null before the first move after start / after end.
The name of the module, derived from the class name
Active pointers keyed by native pointerId.
Optional prefix for classnames used by the module
Current properties. Do not mutate these directly, use updateProps instead.
Protected_addAdds prefixed classes to an element and removes them on destroy.
Skips classes that are already present on the element.
Target DOM element.
Unprefixed class name segments.
Protected_cnBuilds one or more prefixed class names.
Unprefixed class name segments.
Space-separated prefixed class string.
Protected_destroyInternal method to handle the destruction of the module. It removes all callbacks, destroys properties, and cleans up event listeners and class names.
Protected_emitEmits a callback event with a fixed payload.
Get default static props
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.
Prevent text selection during a mouse gesture.
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.
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.
Registers a function to run when the instance is destroyed.
If the instance is already destroyed, action runs immediately.
Cleanup function (for example remove listeners or DOM classes).
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