diff options
author | Felix Nagel <info@felixnagel.com> | 2012-05-31 18:43:42 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-05-31 18:43:42 +0200 |
commit | 749c8fbb6673a15c6477b43d6a6a4f7101f85a5b (patch) | |
tree | e10cd0ba0124f646d568e1dea5aa177d14f949cc /ui/jquery.ui.draggable.js | |
parent | 8abe1d015f5b8d1aa68ccc9dd1ad4744b0216938 (diff) | |
parent | e0fe788ee0c0c0d8d23f9d90b9acff713ba1302f (diff) | |
download | jquery-ui-749c8fbb6673a15c6477b43d6a6a4f7101f85a5b.tar.gz jquery-ui-749c8fbb6673a15c6477b43d6a6a4f7101f85a5b.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r-- | ui/jquery.ui.draggable.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 84077ed29..1845f0891 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -55,17 +55,9 @@ $.widget("ui.draggable", $.ui.mouse, { }, - destroy: function() { - if(!this.element.data('draggable')) return; - this.element - .removeData("draggable") - .unbind(".draggable") - .removeClass("ui-draggable" - + " ui-draggable-dragging" - + " ui-draggable-disabled"); + _destroy: function() { + this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); this._mouseDestroy(); - - return this; }, _mouseCapture: function(event) { @@ -102,6 +94,8 @@ $.widget("ui.draggable", $.ui.mouse, { //Create and append the visible helper this.helper = this._createHelper(event); + this.helper.addClass("ui-draggable-dragging"); + //Cache the helper size this._cacheHelperProportions(); @@ -162,7 +156,7 @@ $.widget("ui.draggable", $.ui.mouse, { if ($.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(this, event); - this.helper.addClass("ui-draggable-dragging"); + this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003) |