X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/docs/source/Editor.html?ds=sidebyside diff --git a/docs/source/Editor.html b/docs/source/Editor.html index b9852b67..5550cd01 100644 --- a/docs/source/Editor.html +++ b/docs/source/Editor.html @@ -1,17 +1,12 @@ - -
-/*! - * Ext JS Library 3.0.3 - * Copyright(c) 2006-2009 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license - */ -/** + + + ++ \ No newline at end of fileThe source code + + + + +/** * @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. @@ -71,6 +66,11 @@ Ext.extend(Ext.Editor, Ext.Component, { * The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "c-c?"). */ alignment: "c-c?", + /** + * @cfg {Array} offsets + * The offsets to use when aligning (see {@link Ext.Element#alignTo} for more details. Defaults to [0, 0]. + */ + offsets: [0, 0], /** * @cfg {Boolean/String} shadow "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop" * for bottom-right shadow (defaults to "frame") @@ -227,9 +227,9 @@ Ext.extend(Ext.Editor, Ext.Component, { } 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(); } @@ -276,9 +276,13 @@ Ext.extend(Ext.Editor, Ext.Component, { /** * 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); }, /** @@ -383,10 +387,13 @@ Ext.extend(Ext.Editor, Ext.Component, { }, beforeDestroy : function(){ - Ext.destroy(this.field); - this.field = null; + Ext.destroyMembers(this, 'field'); + + delete this.parentEl; + delete this.boundEl; } }); -Ext.reg('editor', Ext.Editor);- +Ext.reg('editor', Ext.Editor); +