1 <!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-panel.Proxy-method-constructor'><span id='Ext-panel.Proxy'>/**
2 </span></span> * @class Ext.panel.Proxy
4 * A custom drag proxy implementation specific to {@link Ext.panel.Panel}s. This class
5 * is primarily used internally for the Panel's drag drop implementation, and
6 * should never need to be created directly.
8 * @param panel The {@link Ext.panel.Panel} to proxy for
9 * @param config Configuration options
11 Ext.define('Ext.panel.Proxy', {
13 alternateClassName: 'Ext.dd.PanelProxy',
15 constructor: function(panel, config){
16 <span id='Ext-panel.Proxy-property-panel'> /**
17 </span> * @property panel
18 * @type Ext.panel.Panel
21 this.id = this.panel.id +'-ddproxy';
22 Ext.apply(this, config);
25 <span id='Ext-panel.Proxy-cfg-insertProxy'> /**
26 </span> * @cfg {Boolean} insertProxy True to insert a placeholder proxy element
27 * while dragging the panel, false to drag with no proxy (defaults to true).
28 * Most Panels are not absolute positioned and therefore we need to reserve
34 setStatus: Ext.emptyFn,
40 <span id='Ext-panel.Proxy-method-getEl'> /**
41 </span> * Gets the proxy's element
42 * @return {Element} The proxy's element
48 <span id='Ext-panel.Proxy-method-getGhost'> /**
49 </span> * Gets the proxy's ghost Panel
50 * @return {Panel} The proxy's ghost Panel
56 <span id='Ext-panel.Proxy-method-getProxy'> /**
57 </span> * Gets the proxy element. This is the element that represents where the
58 * Panel was before we started the drag operation.
59 * @return {Element} The proxy's element
65 <span id='Ext-panel.Proxy-method-hide'> /**
66 </span> * Hides the proxy
75 // Unghost the Panel, do not move the Panel to where the ghost was
76 this.panel.unghost(null, false);
81 <span id='Ext-panel.Proxy-method-show'> /**
82 </span> * Shows the proxy
86 var panelSize = this.panel.getSize();
87 this.panel.el.setVisibilityMode(Ext.core.Element.DISPLAY);
88 this.ghost = this.panel.ghost();
89 if (this.insertProxy) {
90 // bc Panels aren't absolute positioned we need to take up the space
91 // of where the panel previously was
92 this.proxy = this.panel.el.insertSibling({cls: Ext.baseCSSPrefix + 'panel-dd-spacer'});
93 this.proxy.setSize(panelSize);
99 repair: function(xy, callback, scope) {
101 if (typeof callback == "function") {
102 callback.call(scope || this);
106 <span id='Ext-panel.Proxy-method-moveProxy'> /**
107 </span> * Moves the proxy to a different position in the DOM. This is typically
108 * called while dragging the Panel to keep the proxy sync'd to the Panel's
110 * @param {HTMLElement} parentNode The proxy's parent DOM node
111 * @param {HTMLElement} before (optional) The sibling node before which the
112 * proxy should be inserted (defaults to the parent's last child if not
115 moveProxy : function(parentNode, before){
117 parentNode.insertBefore(this.proxy.dom, before);
120 });</pre></pre></body></html>