Draggable revert

Draggable revert


Just prior to reverting, it would be nice to have a callback to stop
the revert if desired. Right now if revert is set to true it will
always revert even if dropped onto a droppable.
Perhaps there's a better way of doing it then what I've done, but for
my purposes I made a change in ui.draggable.ext.js:
        stop: function(e,ui) {
         if (ui.options.onrevert && !ui.options.onrevert.call(this, e,
ui)) return;
I've added an onrevert callback, where if onrevert exists, it must
return true or false indicating whether or not to proceed with the
revert.
usage is pretty simple:
$('...').draggable(revert:true,onrevert:function(e, ui){return true;});