Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / src / fx / target / CompositeElement.js
1 /*
2
3 This file is part of Ext JS 4
4
5 Copyright (c) 2011 Sencha Inc
6
7 Contact:  http://www.sencha.com/contact
8
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
11
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
13
14 */
15 /**
16  * @class Ext.fx.target.CompositeElement
17  * @extends Ext.fx.target.Element
18  * 
19  * This class represents a animation target for a {@link Ext.CompositeElement}. It allows
20  * each {@link Ext.Element} in the group to be animated as a whole. In general this class will not be
21  * created directly, the {@link Ext.CompositeElement} will be passed to the animation and
22  * and the appropriate target will be created.
23  */
24 Ext.define('Ext.fx.target.CompositeElement', {
25
26     /* Begin Definitions */
27
28     extend: 'Ext.fx.target.Element',
29
30     /* End Definitions */
31
32     isComposite: true,
33     
34     constructor: function(target) {
35         target.id = target.id || Ext.id(null, 'ext-composite-');
36         this.callParent([target]);
37     },
38
39     getAttr: function(attr, val) {
40         var out = [],
41             target = this.target;
42         target.each(function(el) {
43             out.push([el, this.getElVal(el, attr, val)]);
44         }, this);
45         return out;
46     }
47 });
48