aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.draggable.js
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2008-09-18 09:51:50 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2008-09-18 09:51:50 +0000
commit9c0942d14f25909bf8e3b8064965323c280f4274 (patch)
treece5975bebe704a5da7cebf7a129a6c6cde173dfa /ui/ui.draggable.js
parentc40491f1879bcf82246059cb40a6a610cac54b18 (diff)
downloadjquery-ui-9c0942d14f25909bf8e3b8064965323c280f4274.tar.gz
jquery-ui-9c0942d14f25909bf8e3b8064965323c280f4274.zip
droppable: $.ui.ddmanager.drop now returns false in case of non-drop, or the actual droppable (instead of true) in the case of a drop.
draggable: implemented patch that allows revert to be a callback, receives one argument which is the droppable (implements #3175)
Diffstat (limited to 'ui/ui.draggable.js')
-rw-r--r--ui/ui.draggable.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js
index 1179c7df8..fa8fbc611 100644
--- a/ui/ui.draggable.js
+++ b/ui/ui.draggable.js
@@ -309,7 +309,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
if ($.ui.ddmanager && !this.options.dropBehaviour)
var dropped = $.ui.ddmanager.drop(this, e);
- if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true) {
+ if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
var self = this;
$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10) || 500, function() {
self._propagate("stop", e);