mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
draggable - ui-draggable and ui-draggable-disabled classes were not being added
This commit is contained in:
parent
661f111abb
commit
c28d263667
@ -25,9 +25,16 @@
|
||||
if (o.helper == 'original' && !(/(relative|absolute|fixed)/).test(this.element.css('position')))
|
||||
this.element.css('position', 'relative');
|
||||
|
||||
this.element.addClass('ui-draggable');
|
||||
(o.disabled && this.element.addClass('ui-draggable-disabled'));
|
||||
|
||||
this.mouseInit();
|
||||
|
||||
},
|
||||
setData: function(key, value) {
|
||||
(key == 'disabled' && this.element[(value ? 'add' : 'remove') + 'Class']('ui-draggable-disabled'));
|
||||
this.options[key] = value;
|
||||
},
|
||||
mouseStart: function(e) {
|
||||
var o = this.options;
|
||||
|
||||
@ -247,7 +254,7 @@
|
||||
},
|
||||
destroy: function() {
|
||||
if(!this.element.data('draggable')) return;
|
||||
this.element.removeData("draggable").unbind(".draggable");
|
||||
this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable');
|
||||
this.mouseDestroy();
|
||||
}
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user