4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-panel-Proxy-method-constructor'><span id='Ext-panel-Proxy'>/**
19 </span></span> * @class Ext.panel.Proxy
21 * A custom drag proxy implementation specific to {@link Ext.panel.Panel}s. This class
22 * is primarily used internally for the Panel's drag drop implementation, and
23 * should never need to be created directly.
25 * @param panel The {@link Ext.panel.Panel} to proxy for
26 * @param config Configuration options
28 Ext.define('Ext.panel.Proxy', {
30 alternateClassName: 'Ext.dd.PanelProxy',
32 constructor: function(panel, config){
33 <span id='Ext-panel-Proxy-property-panel'> /**
34 </span> * @property panel
35 * @type Ext.panel.Panel
38 this.id = this.panel.id +'-ddproxy';
39 Ext.apply(this, config);
42 <span id='Ext-panel-Proxy-cfg-insertProxy'> /**
43 </span> * @cfg {Boolean} insertProxy True to insert a placeholder proxy element
44 * while dragging the panel, false to drag with no proxy (defaults to true).
45 * Most Panels are not absolute positioned and therefore we need to reserve
51 setStatus: Ext.emptyFn,
57 <span id='Ext-panel-Proxy-method-getEl'> /**
58 </span> * Gets the proxy's element
59 * @return {Element} The proxy's element
65 <span id='Ext-panel-Proxy-method-getGhost'> /**
66 </span> * Gets the proxy's ghost Panel
67 * @return {Panel} The proxy's ghost Panel
73 <span id='Ext-panel-Proxy-method-getProxy'> /**
74 </span> * Gets the proxy element. This is the element that represents where the
75 * Panel was before we started the drag operation.
76 * @return {Element} The proxy's element
82 <span id='Ext-panel-Proxy-method-hide'> /**
83 </span> * Hides the proxy
92 // Unghost the Panel, do not move the Panel to where the ghost was
93 this.panel.unghost(null, false);
98 <span id='Ext-panel-Proxy-method-show'> /**
99 </span> * Shows the proxy
103 var panelSize = this.panel.getSize();
104 this.panel.el.setVisibilityMode(Ext.core.Element.DISPLAY);
105 this.ghost = this.panel.ghost();
106 if (this.insertProxy) {
107 // bc Panels aren't absolute positioned we need to take up the space
108 // of where the panel previously was
109 this.proxy = this.panel.el.insertSibling({cls: Ext.baseCSSPrefix + 'panel-dd-spacer'});
110 this.proxy.setSize(panelSize);
116 repair: function(xy, callback, scope) {
118 if (typeof callback == "function") {
119 callback.call(scope || this);
123 <span id='Ext-panel-Proxy-method-moveProxy'> /**
124 </span> * Moves the proxy to a different position in the DOM. This is typically
125 * called while dragging the Panel to keep the proxy sync'd to the Panel's
127 * @param {HTMLElement} parentNode The proxy's parent DOM node
128 * @param {HTMLElement} before (optional) The sibling node before which the
129 * proxy should be inserted (defaults to the parent's last child if not
132 moveProxy : function(parentNode, before){
134 parentNode.insertBefore(this.proxy.dom, before);