this.started = false;\r
},\r
\r
+ // TODO: make sure destroying one instance of mouse doesn't mess with\r
+ // other instances of mouse\r
mouseDestroy: function() {\r
this.element.unbind('.mouse');\r
\r
},\r
\r
mouseDown: function(e) {\r
- \r
// we may have missed mouseup (out of window)\r
- (this._mouseStarted\r
- && this.mouseUp(e));\r
+ (this._mouseStarted && this.mouseUp(e));\r
\r
this._mouseDownEvent = e;\r
\r
return true;\r
}\r
\r
- this._mouseDelayMet = (this.options.delay == 0);\r
+ this._mouseDelayMet = !this.options.delay;\r
if (!this._mouseDelayMet) {\r
this._mouseDelayTimer = setTimeout(function() {\r
self._mouseDelayMet = true;\r
// these delegates are required to keep context\r
this._mouseMoveDelegate = function(e) {\r
return self.mouseMove(e);\r
- }\r
+ };\r
this._mouseUpDelegate = function(e) {\r
return self.mouseUp(e);\r
- }\r
+ };\r
$(document)\r
.bind('mousemove.mouse', this._mouseMoveDelegate)\r
.bind('mouseup.mouse', this._mouseUpDelegate);\r
},\r
\r
mouseMove: function(e) {\r
- \r
// IE mouseup check - mouseup happened when mouse was out of window\r
if ($.browser.msie && !e.button) {\r
return this.mouseUp(e);\r
},\r
\r
mouseUp: function(e) {\r
- \r
$(document)\r
.unbind('mousemove.mouse', this._mouseMoveDelegate)\r
.unbind('mouseup.mouse', this._mouseUpDelegate);\r