Changeset 5144
- Timestamp:
- 03/31/08 02:22:00 (9 months ago)
- Location:
- trunk/ui
- Files:
-
- 2 modified
-
ui.draggable.ext.js (modified) (1 diff)
-
ui.draggable.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ui/ui.draggable.ext.js
r5143 r5144 38 38 $.ui.plugin.add("draggable", "revert", { 39 39 stop: function(e, ui) { 40 var self = ui.instance ;40 var self = ui.instance, helper = $(self.helper); 41 41 self.cancelHelperRemoval = true; 42 42 43 $(ui.helper).animate({ left: self.originalPosition.left, top: self.originalPosition.top }, parseInt(ui.options.revert, 10) || 500, function() { 43 if(ui.options.helper != 'original') self.helper.remove();44 self.clear();44 if(ui.options.helper != 'original') helper.remove(); 45 if (!helper) self.clear(); 45 46 }); 46 47 } -
trunk/ui/ui.draggable.js
r5143 r5144 133 133 }, 134 134 start: function(e) { 135 136 135 var o = this.options; 137 136 if($.ui.ddmanager) $.ui.ddmanager.current = this; … … 141 140 if(this.helper[0] != this.element[0]) this.helper.css('position', 'absolute'); 142 141 if(!this.helper.parents('body').length) this.helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo)); 143 142 143 144 144 //Find out the next positioned parent 145 145 this.offsetParent = (function(cp) { … … 230 230 this.checkConstrains(); 231 231 232 this.helper.css({ left: this.position.left+'px', top: this.position.top+'px' }); // Stick the helper to the cursor232 $(this.helper).css({ left: this.position.left+'px', top: this.position.top+'px' }); // Stick the helper to the cursor 233 233 if($.ui.ddmanager) $.ui.ddmanager.drag(this, e); 234 234 return false;
