forked from avoidwork/abaaso
-
Notifications
You must be signed in to change notification settings - Fork 0
mouse
avoidwork edited this page Apr 24, 2012
·
1 revision
Mouse related methods & properties.
// Logging mouse co-ordinates to the console
$.mouse.enabled = true;
$.mouse.log = true;
Mouse co-ordinates offset from last poll
Example
var d = $.mouse.diff,
x = d.x,
y = d.y;
Boolean indicating whether mouse tracking is enabled
Example
$.mouse.enabled = true;
Boolean indicating whether to try logging co-ordinates to the console
Example
$.mouse.log = true;
Mouse co-ordinates
Example
var d = $.mouse.pos,
x = d.x,
y = d.y;
Mouse co-ordinates from previous poll
Example
var d = $.mouse.prev,
x = d.x,
y = d.y;
Enables or disables mouse co-ordinate tracking
@param {Mixed} n Boolean to enable/disable tracking, or Mouse Event
@return {Object} abaaso.mouse
Example
$.mouse.track(true);