-<!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-dd.StatusProxy-method-constructor'><span id='Ext-dd.StatusProxy'>/**
-</span></span> * @class Ext.dd.StatusProxy
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+ <style type="text/css">
+ .highlight { display: block; background-color: #ddd; }
+ </style>
+ <script type="text/javascript">
+ function highlight() {
+ document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+ }
+ </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+ <pre class="prettyprint lang-js"><span id='Ext-dd-StatusProxy'>/**
+</span> * @class Ext.dd.StatusProxy
* A specialized drag proxy that supports a drop status icon, {@link Ext.Layer} styles and auto-repair. This is the
* default drag proxy used by all Ext.dd components.
- * @constructor
- * @param {Object} config
*/
Ext.define('Ext.dd.StatusProxy', {
animRepair: false,
+<span id='Ext-dd-StatusProxy-method-constructor'> /**
+</span> * Creates new StatusProxy.
+ * @param {Object} config (optional) Config object.
+ */
constructor: function(config){
Ext.apply(this, config);
this.id = this.id || Ext.id();
this.proxy = Ext.createWidget('component', {
floating: true,
+ stateful: false,
id: this.id,
html: '<div class="' + Ext.baseCSSPrefix + 'dd-drop-icon"></div>' +
'<div class="' + Ext.baseCSSPrefix + 'dd-drag-ghost"></div>',
this.el = this.proxy.el;
this.el.show();
- this.el.setVisibilityMode(Ext.core.Element.VISIBILITY);
+ this.el.setVisibilityMode(Ext.Element.VISIBILITY);
this.el.hide();
this.ghost = Ext.get(this.el.dom.childNodes[1]);
this.dropStatus = this.dropNotAllowed;
},
-<span id='Ext-dd.StatusProxy-cfg-dropAllowed'> /**
-</span> * @cfg {String} dropAllowed
- * The CSS class to apply to the status element when drop is allowed (defaults to "x-dd-drop-ok").
+<span id='Ext-dd-StatusProxy-cfg-dropAllowed'> /**
+</span> * @cfg {String} [dropAllowed="x-dd-drop-ok"]
+ * The CSS class to apply to the status element when drop is allowed.
*/
dropAllowed : Ext.baseCSSPrefix + 'dd-drop-ok',
-<span id='Ext-dd.StatusProxy-cfg-dropNotAllowed'> /**
-</span> * @cfg {String} dropNotAllowed
- * The CSS class to apply to the status element when drop is not allowed (defaults to "x-dd-drop-nodrop").
+<span id='Ext-dd-StatusProxy-cfg-dropNotAllowed'> /**
+</span> * @cfg {String} [dropNotAllowed="x-dd-drop-nodrop"]
+ * The CSS class to apply to the status element when drop is not allowed.
*/
dropNotAllowed : Ext.baseCSSPrefix + 'dd-drop-nodrop',
-<span id='Ext-dd.StatusProxy-method-setStatus'> /**
+<span id='Ext-dd-StatusProxy-method-setStatus'> /**
</span> * Updates the proxy's visual element to indicate the status of whether or not drop is allowed
* over the current target element.
* @param {String} cssClass The css class for the new drop status indicator image
}
},
-<span id='Ext-dd.StatusProxy-method-reset'> /**
+<span id='Ext-dd-StatusProxy-method-reset'> /**
</span> * Resets the status indicator to the default dropNotAllowed value
* @param {Boolean} clearGhost True to also remove all content from the ghost, false to preserve it
*/
}
},
-<span id='Ext-dd.StatusProxy-method-update'> /**
+<span id='Ext-dd-StatusProxy-method-update'> /**
</span> * Updates the contents of the ghost element
* @param {String/HTMLElement} html The html that will replace the current innerHTML of the ghost element, or a
* DOM node to append as the child of the ghost element (in which case the innerHTML will be cleared first).
html.style.margin = "0";
this.ghost.dom.appendChild(html);
}
- var el = this.ghost.dom.firstChild;
+ var el = this.ghost.dom.firstChild;
if(el){
Ext.fly(el).setStyle('float', 'none');
}
},
-<span id='Ext-dd.StatusProxy-method-getEl'> /**
+<span id='Ext-dd-StatusProxy-method-getEl'> /**
</span> * Returns the underlying proxy {@link Ext.Layer}
* @return {Ext.Layer} el
*/
return this.el;
},
-<span id='Ext-dd.StatusProxy-method-getGhost'> /**
+<span id='Ext-dd-StatusProxy-method-getGhost'> /**
</span> * Returns the ghost element
- * @return {Ext.core.Element} el
+ * @return {Ext.Element} el
*/
getGhost : function(){
return this.ghost;
},
-<span id='Ext-dd.StatusProxy-method-hide'> /**
+<span id='Ext-dd-StatusProxy-method-hide'> /**
</span> * Hides the proxy
* @param {Boolean} clear True to reset the status and clear the ghost contents, false to preserve them
*/
}
},
-<span id='Ext-dd.StatusProxy-method-stop'> /**
+<span id='Ext-dd-StatusProxy-method-stop'> /**
</span> * Stops the repair animation if it's currently running
*/
stop : function(){
}
},
-<span id='Ext-dd.StatusProxy-method-show'> /**
+<span id='Ext-dd-StatusProxy-method-show'> /**
</span> * Displays this proxy
*/
show : function() {
this.proxy.toFront();
},
-<span id='Ext-dd.StatusProxy-method-sync'> /**
+<span id='Ext-dd-StatusProxy-method-sync'> /**
</span> * Force the Layer to sync its shadow and shim positions to the element
*/
sync : function(){
this.proxy.el.sync();
},
-<span id='Ext-dd.StatusProxy-method-repair'> /**
+<span id='Ext-dd-StatusProxy-method-repair'> /**
</span> * Causes the proxy to return to its position of origin via an animation. Should be called after an
* invalid drop operation by the item being dragged.
- * @param {Array} xy The XY position of the element ([x, y])
+ * @param {Number[]} xy The XY position of the element ([x, y])
* @param {Function} callback The function to call after the repair is complete.
* @param {Object} scope The scope (<code>this</code> reference) in which the callback function is executed. Defaults to the browser window.
*/
destroy: function(){
Ext.destroy(this.ghost, this.proxy, this.el);
}
-});</pre></pre></body></html>
\ No newline at end of file
+});</pre>
+</body>
+</html>