r1016 - branches/dev/grid/ui

r1016 - branches/dev/grid/ui


Author: paul.bakaus
Date: Thu Nov 27 02:11:47 2008
New Revision: 1016
Modified:
branches/dev/grid/ui/ui.draggable.js
Log:
draggable: Implemented keepHelper option that allows to keep the i.e. the
clone after the drag (this was requested frequently)
Modified: branches/dev/grid/ui/ui.draggable.js
==============================================================================
--- branches/dev/grid/ui/ui.draggable.js    (original)
+++ branches/dev/grid/ui/ui.draggable.js    Thu Nov 27 02:11:47 2008
@@ -322,8 +322,11 @@
    },
    _clear: function() {
        this.helper.removeClass("ui-draggable-dragging");
+        
+        if(this.options.keepHelper) this.cancelHelperRemoval = true;
        if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval)
this.helper.remove();
        //if($.ui.ddmanager) $.ui.ddmanager.current = null;
+        
        this.helper = null;
        this.cancelHelperRemoval = false;
    },
@@ -364,6 +367,7 @@
        distance: 1,
        grid: false,
        helper: "original",
+        keepHelper: false,
        iframeFix: false,
        opacity: 1,
        refreshPositions: false,