diff options
-rw-r--r-- | ui/jquery.ui.draggable.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 92dd13c0d..ccc1fe81b 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -212,10 +212,10 @@ $.widget("ui.draggable", $.ui.mouse, { return false; if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { - var self = this; + var that = this; $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { - if(self._trigger("stop", event) !== false) { - self._clear(); + if(that._trigger("stop", event) !== false) { + that._clear(); } }); } else { @@ -558,7 +558,7 @@ $.ui.plugin.add("draggable", "connectToSortable", { }, drag: function(event, ui) { - var inst = $(this).data("draggable"), self = this; + var inst = $(this).data("draggable"), that = this; var checkPos = function(o) { var dyClick = this.offset.click.top, dxClick = this.offset.click.left; @@ -585,7 +585,7 @@ $.ui.plugin.add("draggable", "connectToSortable", { //Now we fake the start of dragging for the sortable instance, //by cloning the list group item, appending it to the sortable and using it as inst.currentItem //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) - this.instance.currentItem = $(self).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true); + this.instance.currentItem = $(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true); this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it this.instance.options.helper = function() { return ui.helper[0]; }; |