X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/CompositeElement.html diff --git a/docs/source/CompositeElement.html b/docs/source/CompositeElement.html index 2d26e9c6..8a932f29 100644 --- a/docs/source/CompositeElement.html +++ b/docs/source/CompositeElement.html @@ -1,11 +1,17 @@ - - - The source code - - - - -
/** + + + The source code + + + + +
/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.CompositeElement * @extends Ext.CompositeElementLite * Standard composite class. Creates a Ext.Element for every element in the collection. @@ -38,7 +44,7 @@ Ext.extend(Ext.CompositeElement, Ext.CompositeElementLite, { }); return this; }, - +
/** * Adds elements to this composite. * @param {String/Array} els A string CSS selector, an array of elements or an element @@ -51,13 +57,13 @@ Ext.extend(Ext.CompositeElement, Ext.CompositeElementLite, { if(typeof els == "string"){ els = Ext.Element.selectorFunction(els, root); } - var yels = this.elements; + var yels = this.elements; Ext.each(els, function(e) { yels.push(Ext.get(e)); }); return this; - }, - + }, +
/** * Returns the Element object at the specified index * @param {Number} index @@ -71,12 +77,12 @@ Ext.extend(Ext.CompositeElement, Ext.CompositeElementLite, { indexOf : function(el){ return this.elements.indexOf(Ext.get(el)); }, - + filter : function(selector){ var me = this, out = []; - - Ext.each(me.elements, function(el) { + + Ext.each(me.elements, function(el) { if(el.is(selector)){ out.push(Ext.get(el)); } @@ -84,16 +90,31 @@ Ext.extend(Ext.CompositeElement, Ext.CompositeElementLite, { me.elements = out; return me; }, - -
/** - * Calls the passed function passing (el, this, index) for each element in this composite. - * @param {Function} fn The function to call - * @param {Object} scope (optional) The this object (defaults to the element) - * @return {CompositeElement} this - */ - each : function(fn, scope){ - Ext.each(this.elements, function(e,i) { - return fn.call(scope || e, e, this, i); + +
/** + * Iterates each element in this composite + * calling the supplied function using {@link Ext#each}. + * @param {Function} fn The function to be called with each + * element. If the supplied function returns false, + * iteration stops. This function is called with the following arguments: + *
    + *
  • element : Object + *
    The element at the current index + * in the composite
  • + *
  • composite : Object + *
    This composite.
  • + *
  • index : Number + *
    The current index within the composite + *
  • + *
+ * @param {Object} scope (optional) The scope to call the specified function. + * Defaults to the element at the current index + * within the composite. + * @return {CompositeElement} this + */ + each : function(fn, scope){ + Ext.each(this.elements, function(e, i){ + return fn.call(scope || e, e, this, i); }, this); return this; } @@ -121,7 +142,7 @@ Ext.Element.select = function(selector, unique, root){ } return (unique === true) ? new Ext.CompositeElement(els) : new Ext.CompositeElementLite(els); -}; +};
/** * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods @@ -134,6 +155,6 @@ Ext.Element.select = function(selector, unique, root){ * @member Ext.Element * @method select */ -Ext.select = Ext.Element.select;
- +Ext.select = Ext.Element.select;
+ \ No newline at end of file