diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-02-12 09:31:06 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-02-12 09:31:06 -0500 |
commit | f81348111775bf97a9f5084f0092318ded3b1f26 (patch) | |
tree | b8d5cb07cef1c5ab05c0892dcf6c72f1120e318f /ui/jquery.ui.mouse.js | |
parent | 861842d361d053aed02895a57becaa28a95696eb (diff) | |
download | jquery-ui-f81348111775bf97a9f5084f0092318ded3b1f26.tar.gz jquery-ui-f81348111775bf97a9f5084f0092318ded3b1f26.zip |
Mouse: Use 'that' instead of 'self'. Partial fix for #5404 - remove uses of 'var self = this;'
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-rw-r--r-- | ui/jquery.ui.mouse.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index 888fbedfe..b1826aa23 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -25,15 +25,15 @@ $.widget("ui.mouse", { delay: 0 }, _mouseInit: function() { - var self = this; + var that = this; this.element .bind('mousedown.'+this.widgetName, function(event) { - return self._mouseDown(event); + return that._mouseDown(event); }) .bind('click.'+this.widgetName, function(event) { - if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) { - $.removeData(event.target, self.widgetName + '.preventClickEvent'); + if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) { + $.removeData(event.target, that.widgetName + '.preventClickEvent'); event.stopImmediatePropagation(); return false; } @@ -57,7 +57,7 @@ $.widget("ui.mouse", { this._mouseDownEvent = event; - var self = this, + var that = this, btnIsLeft = (event.which == 1), // event.target.nodeName works around a bug in IE 8 with // disabled inputs (#7620) @@ -69,7 +69,7 @@ $.widget("ui.mouse", { this.mouseDelayMet = !this.options.delay; if (!this.mouseDelayMet) { this._mouseDelayTimer = setTimeout(function() { - self.mouseDelayMet = true; + that.mouseDelayMet = true; }, this.options.delay); } @@ -88,10 +88,10 @@ $.widget("ui.mouse", { // these delegates are required to keep context this._mouseMoveDelegate = function(event) { - return self._mouseMove(event); + return that._mouseMove(event); }; this._mouseUpDelegate = function(event) { - return self._mouseUp(event); + return that._mouseUp(event); }; $(document) .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate) |