X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/f5240829880f87e0cf581c6a296e436fdef0ef80..HEAD:/docs/source/Element.keys.html?ds=sidebyside diff --git a/docs/source/Element.keys.html b/docs/source/Element.keys.html index c3528d94..bec6b3b4 100644 --- a/docs/source/Element.keys.html +++ b/docs/source/Element.keys.html @@ -1,28 +1,31 @@ +
- +/*! - * Ext JS Library 3.3.0 - * Copyright(c) 2006-2010 Ext JS, Inc. - * licensing@extjs.com - * http://www.extjs.com/license - */ -/** - * @class Ext.Element + +- \ No newline at end of file +/** + * @class Ext.Element */ Ext.Element.addMethods({ - /** - * Convenience method for constructing a KeyMap - * @param {Number/Array/Object/String} key Either a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options: - *+Ext.CompositeElementLite.importElementMethods(); +{key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
+ /** + * Convenience method for constructing a KeyMap + * @param {String/Number/Number[]/Object} key Either a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options: + * <code>{key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}</code> * @param {Function} fn The function to call - * @param {Object} scope (optional) The scope (this
reference) in which the specified function is executed. Defaults to this Element. - * @return {Ext.KeyMap} The KeyMap created + * @param {Object} scope (optional) The scope (<code>this</code> reference) in which the specified function is executed. Defaults to this Element. + * @return {Ext.util.KeyMap} The KeyMap created */ addKeyListener : function(key, fn, scope){ var config; @@ -42,21 +45,22 @@ Ext.Element.addMethods({ scope: scope }; } - return new Ext.KeyMap(this, config); + return Ext.create('Ext.util.KeyMap', this, config); }, - /** - * Creates a KeyMap for this element - * @param {Object} config The KeyMap config. See {@link Ext.KeyMap} for more details - * @return {Ext.KeyMap} The KeyMap created + /** + * Creates a KeyMap for this element + * @param {Object} config The KeyMap config. See {@link Ext.util.KeyMap} for more details + * @return {Ext.util.KeyMap} The KeyMap created */ addKeyMap : function(config){ - return new Ext.KeyMap(this, config); + return Ext.create('Ext.util.KeyMap', this, config); } }); //Import the newly-added Ext.Element functions into CompositeElementLite. We call this here because //Element.keys.js is the last extra Ext.Element include in the ext-all.js build -Ext.CompositeElementLite.importElementMethods();