X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..refs/heads/old:/docs/source/PanelDD.html diff --git a/docs/source/PanelDD.html b/docs/source/PanelDD.html index 32b25fd9..33344479 100644 --- a/docs/source/PanelDD.html +++ b/docs/source/PanelDD.html @@ -7,10 +7,10 @@
/*!
- * Ext JS Library 3.2.0
- * Copyright(c) 2006-2010 Ext JS, Inc.
- * licensing@extjs.com
- * http://www.extjs.com/license
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
  */
 
/** * @class Ext.dd.PanelProxy @@ -20,13 +20,14 @@ * @param panel The {@link Ext.Panel} to proxy for * @param config Configuration options */ -Ext.dd.PanelProxy = function(panel, config){ - this.panel = panel; - this.id = this.panel.id +'-ddproxy'; - Ext.apply(this, config); -}; - -Ext.dd.PanelProxy.prototype = { +Ext.dd.PanelProxy = Ext.extend(Object, { + + constructor : function(panel, config){ + this.panel = panel; + this.id = this.panel.id +'-ddproxy'; + Ext.apply(this, config); + }, +
/** * @cfg {Boolean} insertProxy True to insert a placeholder proxy element while dragging the panel, * false to drag with no proxy (defaults to true). @@ -84,7 +85,7 @@ Ext.dd.PanelProxy.prototype = { */ show : function(){ if(!this.ghost){ - this.ghost = this.panel.createGhost(undefined, undefined, Ext.getBody()); + this.ghost = this.panel.createGhost(this.panel.initialConfig.cls, undefined, Ext.getBody()); this.ghost.setXY(this.panel.el.getXY()); if(this.insertProxy){ this.proxy = this.panel.el.insertSibling({cls:'x-panel-dd-spacer'}); @@ -114,31 +115,34 @@ Ext.dd.PanelProxy.prototype = { parentNode.insertBefore(this.proxy.dom, before); } } -}; +}); // private - DD implementation for Panels -Ext.Panel.DD = function(panel, cfg){ - this.panel = panel; - this.dragData = {panel: panel}; - this.proxy = new Ext.dd.PanelProxy(panel, cfg); - Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg); - var h = panel.header; - if(h){ - this.setHandleElId(h.id); - } - (h ? h : this.panel.body).setStyle('cursor', 'move'); - this.scroll = false; -}; - -Ext.extend(Ext.Panel.DD, Ext.dd.DragSource, { +Ext.Panel.DD = Ext.extend(Ext.dd.DragSource, { + + constructor : function(panel, cfg){ + this.panel = panel; + this.dragData = {panel: panel}; + this.proxy = new Ext.dd.PanelProxy(panel, cfg); + Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg); + var h = panel.header, + el = panel.body; + if(h){ + this.setHandleElId(h.id); + el = panel.header; + } + el.setStyle('cursor', 'move'); + this.scroll = false; + }, + showFrame: Ext.emptyFn, startDrag: Ext.emptyFn, b4StartDrag: function(x, y) { this.proxy.show(); }, b4MouseDown: function(e) { - var x = e.getPageX(); - var y = e.getPageY(); + var x = e.getPageX(), + y = e.getPageY(); this.autoOffset(x, y); }, onInitDrag : function(x, y){