Mouse Interaction The base interaction layer.

Similar to jQuery.Widget, the mouse interaction is not intended to be used directly. It is purely a base layer for other widgets to inherit from. This page only documents what is added to jQuery.Widget, but it does include internal methods that are not intended to be overwritten. The intended public API is _mouseStart(), _mouseDrag(), _mouseStop(), and _mouseCapture().

Initializes the interaction event handlers. This must be called from the extending widget's _create() method. Destroys the interaction event handlers. This must be called from the extending widget's _destroy() method. Handles the beginning of an interaction. Verifies that the event is associated with the primary mouse button and ensures that the delay and distance options are met prior to starting the interaction. When the interaction is ready to start, invokes the _mouseStart() method for the extending widget to handle. Handles each movement of the interaction. Invokes the mouseDrag() method for the extending widget to handle. Handles the end of the interaction. Invokes the mouseStop() method for the extending widget to handle. Determines whether the distance option has been met for the current interaction. Determines whether the delay option has been met for the current interaction. The extending widget should implement a _mouseStart() method to handle the beginning of an interaction. This method will receive the mouse event associated with the start of the interaction. The extending widget should implement a _mouseDrag() method to handle each movement of an interaction. This method will receive the mouse event associated with the movement. The extending widget should implement a _mouseStop() method to handle the end of an interaction. This method will receive the mouse event associated with the end of the interaction. Determines whether an interaction should start based on event target of the interaction. The default implementation always returns true.