Draggable: Fixed destroy method.

This commit is contained in:
Scott González 2012-05-24 15:10:49 -04:00
parent 86bd95caf0
commit 4da1716cfd

View File

@ -55,17 +55,9 @@ $.widget("ui.draggable", $.ui.mouse, {
}, },
destroy: function() { _destroy: function() {
if(!this.element.data('draggable')) return; this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
this.element
.removeData("draggable")
.unbind(".draggable")
.removeClass("ui-draggable"
+ " ui-draggable-dragging"
+ " ui-draggable-disabled");
this._mouseDestroy(); this._mouseDestroy();
return this;
}, },
_mouseCapture: function(event) { _mouseCapture: function(event) {