Skip to content
Permalink
Browse files

draggable - ui-draggable and ui-draggable-disabled classes were not b…

…eing added
  • Loading branch information
rdworth committed May 26, 2008
1 parent 661f111 commit c28d2636673e77de7ed814da5d783d2c501784d6
Showing with 9 additions and 2 deletions.
  1. +9 −2 ui/source/ui.draggable.js
@@ -22,12 +22,19 @@
var o = this.options;

//Position the node
if(o.helper == 'original' && !(/(relative|absolute|fixed)/).test(this.element.css('position')))
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();
}
}));

0 comments on commit c28d263

Please sign in to comment.
You can’t perform that action at this time.