-<html>
-<head>
- <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>
-</head>
-<body onload="prettyPrint();">
- <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.Editor"></div>/**
+<html>\r
+<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
+ <title>The source code</title>\r
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body onload="prettyPrint();">\r
+ <pre class="prettyprint lang-js"><div id="cls-Ext.Editor"></div>/**
* @class Ext.Editor
* @extends Ext.Component
* A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic.
* The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "c-c?").
*/
alignment: "c-c?",
+ <div id="cfg-Ext.Editor-offsets"></div>/**
+ * @cfg {Array} offsets
+ * The offsets to use when aligning (see {@link Ext.Element#alignTo} for more details. Defaults to <tt>[0, 0]</tt>.
+ */
+ offsets: [0, 0],
<div id="cfg-Ext.Editor-shadow"></div>/**
* @cfg {Boolean/String} shadow "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop"
* for bottom-right shadow (defaults to "frame")
}
if(this.fireEvent("beforestartedit", this, this.boundEl, v) !== false){
this.startValue = v;
+ this.field.reset();
this.field.setValue(v);
- this.doAutoSize();
- this.el.alignTo(this.boundEl, this.alignment);
+ this.realign(true);
this.editing = true;
this.show();
}
<div id="method-Ext.Editor-realign"></div>/**
* Realigns the editor to the bound field based on the current alignment config value.
+ * @param {Boolean} autoSize (optional) True to size the field to the dimensions of the bound element.
*/
- realign : function(){
- this.el.alignTo(this.boundEl, this.alignment);
+ realign : function(autoSize){
+ if(autoSize === true){
+ this.doAutoSize();
+ }
+ this.el.alignTo(this.boundEl, this.alignment, this.offsets);
},
<div id="method-Ext.Editor-completeEdit"></div>/**
},
beforeDestroy : function(){
- Ext.destroy(this.field);
- this.field = null;
+ Ext.destroyMembers(this, 'field');
+
+ delete this.parentEl;
+ delete this.boundEl;
}
});
-Ext.reg('editor', Ext.Editor);</pre>
-</body>
+Ext.reg('editor', Ext.Editor);
+</pre> \r
+</body>\r
</html>
\ No newline at end of file