Mouse Interaction
Description: 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()
.
Options
cancelType: Selector
"input,textarea,button,select,option"
Initialize the jQuery.ui.mouse with the cancel option specified:
$( ".selector" ).jQuery.ui.mouse({ cancel: ".title" }); |
Get or set the cancel option, after initialization:
// getter var cancel = $( ".selector" ).jQuery.ui.mouse( "option" , "cancel" ); // setter $( ".selector" ).jQuery.ui.mouse( "option" , "cancel" , ".title" ); |
delayType: Number
0
Initialize the jQuery.ui.mouse with the delay option specified:
$( ".selector" ).jQuery.ui.mouse({ delay: 300 }); |
Get or set the delay option, after initialization:
// getter var delay = $( ".selector" ).jQuery.ui.mouse( "option" , "delay" ); // setter $( ".selector" ).jQuery.ui.mouse( "option" , "delay" , 300 ); |
distanceType: Number
1
Initialize the jQuery.ui.mouse with the distance option specified:
$( ".selector" ).jQuery.ui.mouse({ distance: 10 }); |
Get or set the distance option, after initialization:
// getter var distance = $( ".selector" ).jQuery.ui.mouse( "option" , "distance" ); // setter $( ".selector" ).jQuery.ui.mouse( "option" , "distance" , 10 ); |
Methods
_mouseCapture()Returns: Boolean
true
.
- This method does not accept any arguments.
Invoke the _mouseCapture method:
$( ".selector" ).jQuery.ui.mouse( "_mouseCapture" ); |
_mouseDestroy()
_destroy()
method.
- This method does not accept any arguments.
Invoke the _mouseDestroy method:
$( ".selector" ).jQuery.ui.mouse( "_mouseDestroy" ); |
_mouseDown()
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.
- This method does not accept any arguments.
Invoke the _mouseDown method:
$( ".selector" ).jQuery.ui.mouse( "_mouseDown" ); |
_mouseDrag()
_mouseDrag()
method to handle each movement of an interaction. This method will receive the mouse event associated with the movement.
- This method does not accept any arguments.
Invoke the _mouseDrag method:
$( ".selector" ).jQuery.ui.mouse( "_mouseDrag" ); |
_mouseInit()
_create()
method.
- This method does not accept any arguments.
Invoke the _mouseInit method:
$( ".selector" ).jQuery.ui.mouse( "_mouseInit" ); |
_mouseMove()
mouseDrag()
method for the extending widget to handle.
- This method does not accept any arguments.
Invoke the _mouseMove method:
$( ".selector" ).jQuery.ui.mouse( "_mouseMove" ); |
_mouseStart()
_mouseStart()
method to handle the beginning of an interaction. This method will receive the mouse event associated with the start of the interaction.
- This method does not accept any arguments.
Invoke the _mouseStart method:
$( ".selector" ).jQuery.ui.mouse( "_mouseStart" ); |
_mouseStop()
_mouseStop()
method to handle the end of an interaction. This method will receive the mouse event associated with the end of the interaction.
- This method does not accept any arguments.
Invoke the _mouseStop method:
$( ".selector" ).jQuery.ui.mouse( "_mouseStop" ); |
_mouseUp()
mouseStop()
method for the extending widget to handle.
- This method does not accept any arguments.
Invoke the _mouseUp method:
$( ".selector" ).jQuery.ui.mouse( "_mouseUp" ); |