Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / source / widgets / PanelDD.js
diff --git a/source/widgets/PanelDD.js b/source/widgets/PanelDD.js
deleted file mode 100644 (file)
index 51eec2c..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*\r
- * Ext JS Library 2.2.1\r
- * Copyright(c) 2006-2009, Ext JS, LLC.\r
- * licensing@extjs.com\r
- * \r
- * http://extjs.com/license\r
- */\r
-\r
-/* // Internal developer documentation -- will not show up in API docs\r
- * @class Ext.dd.PanelProxy\r
- * A custom drag proxy implementation specific to {@link Ext.Panel}s. This class is primarily used internally\r
- * for the Panel's drag drop implementation, and should never need to be created directly.\r
- * @constructor\r
- * @param panel The {@link Ext.Panel} to proxy for\r
- * @param config Configuration options\r
- */\r
-Ext.dd.PanelProxy = function(panel, config){\r
-    this.panel = panel;\r
-    this.id = this.panel.id +'-ddproxy';\r
-    Ext.apply(this, config);\r
-};\r
-\r
-Ext.dd.PanelProxy.prototype = {\r
-    /**\r
-     * @cfg {Boolean} insertProxy True to insert a placeholder proxy element while dragging the panel,\r
-      * false to drag with no proxy (defaults to true).\r
-     */\r
-    insertProxy : true,\r
-\r
-    // private overrides\r
-    setStatus : Ext.emptyFn,\r
-    reset : Ext.emptyFn,\r
-    update : Ext.emptyFn,\r
-    stop : Ext.emptyFn,\r
-    sync: Ext.emptyFn,\r
-\r
-    /**\r
-     * Gets the proxy's element\r
-     * @return {Element} The proxy's element\r
-     */\r
-    getEl : function(){\r
-        return this.ghost;\r
-    },\r
-\r
-    /**\r
-     * Gets the proxy's ghost element\r
-     * @return {Element} The proxy's ghost element\r
-     */\r
-    getGhost : function(){\r
-        return this.ghost;\r
-    },\r
-\r
-    /**\r
-     * Gets the proxy's element\r
-     * @return {Element} The proxy's element\r
-     */\r
-    getProxy : function(){\r
-        return this.proxy;\r
-    },\r
-\r
-    /**\r
-     * Hides the proxy\r
-     */\r
-    hide : function(){\r
-        if(this.ghost){\r
-            if(this.proxy){\r
-                this.proxy.remove();\r
-                delete this.proxy;\r
-            }\r
-            this.panel.el.dom.style.display = '';\r
-            this.ghost.remove();\r
-            delete this.ghost;\r
-        }\r
-    },\r
-\r
-    /**\r
-     * Shows the proxy\r
-     */\r
-    show : function(){\r
-        if(!this.ghost){\r
-            this.ghost = this.panel.createGhost(undefined, undefined, Ext.getBody());\r
-            this.ghost.setXY(this.panel.el.getXY())\r
-            if(this.insertProxy){\r
-                this.proxy = this.panel.el.insertSibling({cls:'x-panel-dd-spacer'});\r
-                this.proxy.setSize(this.panel.getSize());\r
-            }\r
-            this.panel.el.dom.style.display = 'none';\r
-        }\r
-    },\r
-\r
-    // private\r
-    repair : function(xy, callback, scope){\r
-        this.hide();\r
-        if(typeof callback == "function"){\r
-            callback.call(scope || this);\r
-        }\r
-    },\r
-\r
-    /**\r
-     * Moves the proxy to a different position in the DOM.  This is typically called while dragging the Panel\r
-     * to keep the proxy sync'd to the Panel's location.\r
-     * @param {HTMLElement} parentNode The proxy's parent DOM node\r
-     * @param {HTMLElement} before (optional) The sibling node before which the proxy should be inserted (defaults\r
-     * to the parent's last child if not specified)\r
-     */\r
-    moveProxy : function(parentNode, before){\r
-        if(this.proxy){\r
-            parentNode.insertBefore(this.proxy.dom, before);\r
-        }\r
-    }\r
-};\r
-\r
-// private - DD implementation for Panels\r
-Ext.Panel.DD = function(panel, cfg){\r
-    this.panel = panel;\r
-    this.dragData = {panel: panel};\r
-    this.proxy = new Ext.dd.PanelProxy(panel, cfg);\r
-    Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg);\r
-    var h = panel.header;\r
-    if(h){\r
-        this.setHandleElId(h.id);\r
-    }\r
-    (h ? h : this.panel.body).setStyle('cursor', 'move');\r
-    this.scroll = false;\r
-};\r
-\r
-Ext.extend(Ext.Panel.DD, Ext.dd.DragSource, {\r
-    showFrame: Ext.emptyFn,\r
-    startDrag: Ext.emptyFn,\r
-    b4StartDrag: function(x, y) {\r
-        this.proxy.show();\r
-    },\r
-    b4MouseDown: function(e) {\r
-        var x = e.getPageX();\r
-        var y = e.getPageY();\r
-        this.autoOffset(x, y);\r
-    },\r
-    onInitDrag : function(x, y){\r
-        this.onStartDrag(x, y);\r
-        return true;\r
-    },\r
-    createFrame : Ext.emptyFn,\r
-    getDragEl : function(e){\r
-        return this.proxy.ghost.dom;\r
-    },\r
-    endDrag : function(e){\r
-        this.proxy.hide();\r
-        this.panel.saveState();\r
-    },\r
-\r
-    autoOffset : function(x, y) {\r
-        x -= this.startPageX;\r
-        y -= this.startPageY;\r
-        this.setDelta(x, y);\r
-    }\r
-});
\ No newline at end of file