Draggable: Added revertDuration backCompat.

This commit is contained in:
Dave Stein 2012-12-11 19:28:47 -05:00
parent 5a2e5a0a9a
commit 34b4fbf08b

View File

@ -709,10 +709,11 @@ if ( $.uiBackCompat !== false ) {
});
// TODO: handle droppables
// revert option
// revert + revertDuration options
$.widget( "ui.draggable", $.ui.draggable, {
options: {
revert: false
revert: false,
revertDuration: 500
},
_create : function() {
@ -739,11 +740,11 @@ if ( $.uiBackCompat !== false ) {
this.element.on( "dragstop", function( e, ui ) {
// Reset to before drag
self.dragEl.css({
self.dragEl.animate({
left: originalLeft,
top: originalTop,
position: originalPosition
});
}, self.options.revertDuration );
});