Installer function to listen for a specific event: mouse-click. Pass your callbacks here.
Note: this support chaining.
The click-callback to listen for.
this
Call this when your work is done.
The function will un-install all event listeners.
Installer function to listen for a specific event: mouse-down. Pass your callbacks here.
Note: this support chaining.
The down-callback to listen for.
this
Installer function to listen for a specific event: mouse-drag. Pass your callbacks here.
Note: this support chaining.
The drag-callback to listen for.
this
Install a new listener. Please note that this mouse handler can only handle one listener per event type.
The name of the firing event to listen for.
Build the extended event params.
The mouse event to get the relative position for.
The name of the firing event.
Installer function to listen for a specific event: mouse-move. Pass your callbacks here.
Note: this support chaining.
The move-callback to listen for.
this
Get relative position from the given MouseEvent.
The mouse event to get the relative position for.
The relative mouse coordinates.
An internal function to throw events.
The name of the event.
Un-install a new listener.
The name of the firing event to unlisten for.
Installer function to listen for a specific event: mouse-up. Pass your callbacks here.
Note: this support chaining.
The up-callback to listen for.
this
Installer function to listen for a specific event: mouse-wheel. Pass your callbacks here.
Note: this support chaining.
The wheel-callback to listen for.
this
Generated using TypeDoc
A simple mouse handler for demos. Use to avoid load massive libraries like jQuery.
XYCoords