]> source.dussan.org Git - jquery-ui.git/commitdiff
Draggable: Apply ui-draggable-dragging class prior to calculating dimensions. Fixes...
authorViktar Varvanovich <non4eg@gmail.com>
Thu, 24 May 2012 18:30:55 +0000 (14:30 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 24 May 2012 18:31:52 +0000 (14:31 -0400)
ui/jquery.ui.draggable.js

index 84077ed29b6205651c9b39b19125097d4516dea2..5eb2356425b85423d2b395c591341164715be02f 100644 (file)
@@ -102,6 +102,8 @@ $.widget("ui.draggable", $.ui.mouse, {
                //Create and append the visible helper
                this.helper = this._createHelper(event);
 
+               this.helper.addClass("ui-draggable-dragging");
+
                //Cache the helper size
                this._cacheHelperProportions();
 
@@ -162,7 +164,7 @@ $.widget("ui.draggable", $.ui.mouse, {
                if ($.ui.ddmanager && !o.dropBehaviour)
                        $.ui.ddmanager.prepareOffsets(this, event);
 
-               this.helper.addClass("ui-draggable-dragging");
+               
                this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
                
                //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)