1 Ext.ux.DraggablePanel = function(panel, config) { 2 Ext.ux.DraggablePanel.superclass.constructor.call(this, panel, config); 3 } 4 5 Ext.extend(Ext.ux.DraggablePanel, Ext.dd.PanelProxy, { 6 hide : function(){ 7 if(this.ghost){ 8 if(this.proxy){ 9 this.proxy.remove(); 10 delete this.proxy; 11 } 12 this.panel.dom.style.display = ''; 13 this.ghost.remove(); 14 delete this.ghost; 15 } 16 }, 17 18 show : function(){ 19 if(!this.ghost){ 20 this.ghost = this.panel.createGhost(undefined, undefined, Ext.getBody()); 21 this.ghost.setXY(this.panel.getXY()) 22 if(this.insertProxy){ 23 this.proxy = this.panel.insertSibling({cls:'x-panel-dd-spacer'}); 24 25 this.proxy.setSize(this.panel.getSize()); 26 } 27 this.panel.dom.style.display = 'none'; 28 } 29 } 30 }); 31 32 Ext.reg('draggable-panel', Ext.ux.DraggablePanel);