Interaction options which configure handling workflows
The current interaction state
Bound interaction data object to populate with custom data.
The drag handling time
The time of the last left-click event
The time of the last right-click event
A flag for whether we are right-click dragging
An optional ControlIcon instance for the object
Bound handlers which can be added and removed
Enumerate the states of a mouse interaction workflow. 0: NONE - the object is inactive 1: HOVER - the mouse is hovered over the object 2: CLICKED - the object is clicked 3: DRAG - the object is being dragged 4: DROP - the object is being dropped
The number of milliseconds of mouse click depression to consider it a long press.
Global timeout for the long-press event.
Enumerate the states of handle outcome. -2: SKIPPED - the handler has been skipped by previous logic -1: DISALLOWED - the handler has dissallowed further process 1: REFUSED - the handler callback has been processed and is refusing further process 2: ACCEPTED - the handler callback has been processed and is accepting further process
Get the target.
Is this mouse manager in a dragging state?
A reference to the possible interaction states which can be observed
A reference to the possible interaction states which can be observed
Activate interactivity for the handled object
Test whether the current user has permission to perform a step of the workflow
The action being attempted
The event being handled
Can the action be performed?
Execute a callback function associated with a certain action in the workflow
The action being attempted
The event being handled
Additional callback arguments.
A boolean which may indicate that the event was handled by the callback. Events which do not specify a callback are assumed to have been handled as no-op.
A public method to handle directly an event into this manager, according to its type. Note: drag events are not handled.
Has the event been processed?
A public method to cancel a current interaction workflow from this manager.
The event that initiates the cancellation
Reset the mouse manager.
Activate a set of listeners which handle hover events on the target object
Activate a new set of listeners for click events on the target object.
Deactivate event listeners for click events on the target object.
Activate events required for handling a drag-and-drop workflow
Deactivate events required for handling drag-and-drop workflow.
Handle mouse-over events which activate downstream listeners and do not stop propagation.
Handle mouse-out events which terminate hover workflows and do not stop propagation.
Handle mouse-down events which activate downstream listeners. Stop further propagation only if the event is allowed by either single or double-click.
Handle mouse-down which trigger a single left-click workflow.
Handle mouse-down which trigger a single left-click workflow.
Handle a long mouse depression to trigger a long-press workflow.
The mousedown event.
The original canvas co-ordinates of the mouse click
Handle right-click mouse-down events. Stop further propagation only if the event is allowed by either single or double-click.
Handle single right-click actions.
Handle double right-click actions.
Handle mouse movement during a drag workflow
Handle the beginning of a new drag start workflow, moving all controlled objects on the layer
Handle the continuation of a drag workflow, moving all controlled objects on the layer
Handle mouse up events which may optionally conclude a drag workflow
Handle the conclusion of a drag workflow, placing all dragged objects back on the layer
Handle the cancellation of a drag workflow, resetting back to the original state
Display a debug message in the console (if mouse interaction debug is activated).
Which action to display?
Which event to display?
Assign the interaction data to the event.
Handle mouse interaction events for a Canvas object. There are three phases of events: hover, click, and drag
Hover Events: _handleMouseOver action: hoverIn _handleMouseOut action: hoverOut
Left Click and Double-Click _handleMouseDown action: clickLeft action: clickLeft2
Right Click and Double-Click _handleRightDown action: clickRight action: clickRight2
Drag and Drop _handleMouseMove action: dragLeftStart action: dragRightStart action: dragLeftMove action: dragRightMove _handleMouseUp action: dragLeftDrop action: dragRightDrop _handleDragCancel action: dragLeftCancel action: dragRightCancel