]> source.dussan.org Git - jquery-ui.git/commitdiff
draggable, droppable: added a class do the active draggable helper, that will be...
authorPaul Bakaus <paul.bakaus@googlemail.com>
Sun, 25 May 2008 16:50:18 +0000 (16:50 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Sun, 25 May 2008 16:50:18 +0000 (16:50 +0000)
ui/source/ui.draggable.js
ui/source/ui.droppable.js

index f012e6f53365653bec54ff7eb40fff38a702177d..ac74ae00af00631a7e4d61a6bb2f339ea63137a6 100644 (file)
                        this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Recache the helper size\r
                        if ($.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(this, e);\r
                        \r
+                       this.helper.addClass("ui-draggable-dragging");\r
                        this.mouseDrag(e); //Execute the drag once - this causes the helper not to be visible before getting its correct position\r
                        return true;\r
                },\r
                        return false;\r
                },\r
                clear: function() {\r
+                       this.helper.removeClass("ui-draggable-dragging");\r
                        if(this.options.helper != 'original' && !this.cancelHelperRemoval) this.helper.remove();\r
                        if($.ui.ddmanager) $.ui.ddmanager.current = null;\r
                        this.helper = null;\r
index 7dcd86b28249a1321fad4ec276b2038400f6d165..546eda7ff8100ee530a59c0cf6ef929348f232f5 100644 (file)
@@ -96,7 +96,7 @@
                        if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element\r
                        \r
                        var childrenIntersection = false;\r
-                       this.element.find(".ui-droppable").each(function() {\r
+                       this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function() {\r
                                var inst = $.data(this, 'droppable');\r
                                if(inst.options.greedy && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)) {\r
                                        childrenIntersection = true; return false;\r