Changeset 6537
- Timestamp:
- 04/18/07 12:00:05 (1 year ago)
- Files:
-
- spinoffs/prototype/branches/event/src/event.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/prototype/branches/event/src/event.js
r6454 r6537 31 31 }, 32 32 33 _isSpecificButton: function(event, ieCode, w3cCode) { 34 return (((event.which) && (event.which == ieCode)) || 35 ((event.button) && (event.button == w3cCode))); 36 }, 37 33 38 isLeftClick: function(event) { 34 return event.which == 1 || event.button == 1;39 return this._isSpecificButton(event, 1, 0); 35 40 }, 36 41 42 isRightClick: function(event) { 43 return this._isSpecificButton(event, 3, 2); 44 }, 45 46 isMiddleClick: function(event) { 47 return this._isSpecificButton(event, 2, 1); 48 }, 49 37 50 pointer: function(event) { 38 51 var x = event.pageX || (event.clientX +