Ticket #2914: ui.draggable.js.patch
File ui.draggable.js.patch, 1.8 KB (added by , 14 years ago) |
---|
-
ui/ui.draggable.js
a b 213 213 if ($.ui.ddmanager && !this.options.dropBehaviour) 214 214 $.ui.ddmanager.drop(this, e); 215 215 216 if(this.options.revert) { 217 var self = this; 218 $(this.helper).animate(this.originalPosition, parseInt(this.options.revert, 10) || 500, fu 219 self.propagate("stop", e); 220 self.clear(); 221 }); 222 } else { 216 if(this.options.revert) this.revert(); 217 else { 223 218 this.propagate("stop", e); 224 219 this.clear(); 225 220 } 226 227 221 return false; 228 222 229 223 }, 224 revert: function(e){ 225 var self = this; 226 $(this.helper).animate(this.originalPosition, parseInt(this.options.revert, 10) || 500, function() 227 self.propagate("stop", e); 228 self.clear(); 229 }); 230 }, 230 231 clear: function() { 231 if(this.options.helper != 'original' && !this.cancelHelperRemoval) this.helper.remove(); 232 if(this.options.helper != 'original' && !this.cancelHelperRemoval){ 233 this.helper.remove(); 234 this.helper = null; 235 } 232 236 if($.ui.ddmanager) $.ui.ddmanager.current = null; 233 this.helper = null;234 237 this.cancelHelperRemoval = false; 235 238 },