Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/externals/javelin/core/Event.js
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | members : { | ||||
* @return bool | * @return bool | ||||
* @task info | * @task info | ||||
*/ | */ | ||||
isRightButton : function() { | isRightButton : function() { | ||||
var r = this.getRawEvent(); | var r = this.getRawEvent(); | ||||
return r.which == 3 || r.button == 2; | return r.which == 3 || r.button == 2; | ||||
}, | }, | ||||
/** | |||||
* Get whether the mouse button associated with the mouse event is the | |||||
* left-side button in a browser-agnostic way. | |||||
* | |||||
* @return bool | |||||
* @task info | |||||
*/ | |||||
isLeftButton: function() { | |||||
var r = this.getRawEvent(); | |||||
return (r.which == 1 || r.button == 0); | |||||
epriestley: I'm not 100% this definition works in old IE, but it's the best guess I could dig up from a few… | |||||
}, | |||||
/** | /** | ||||
* Determine if a mouse event is a normal event (left mouse button, no | * Determine if a mouse event is a normal event (left mouse button, no | ||||
* modifier keys). | * modifier keys). | ||||
* | * | ||||
* @return bool | * @return bool | ||||
* @task info | * @task info | ||||
*/ | */ | ||||
isNormalMouseEvent : function() { | isNormalMouseEvent : function() { | ||||
▲ Show 20 Lines • Show All 218 Lines • Show Last 20 Lines |
I'm not 100% this definition works in old IE, but it's the best guess I could dig up from a few minutes of Googling and we don't really support old IE anyway.