Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / source / CompositeSprite.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5   <title>The source code</title>
6   <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7   <script type="text/javascript" src="../prettify/prettify.js"></script>
8   <style type="text/css">
9     .highlight { display: block; background-color: #ddd; }
10   </style>
11   <script type="text/javascript">
12     function highlight() {
13       document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
14     }
15   </script>
16 </head>
17 <body onload="prettyPrint(); highlight();">
18   <pre class="prettyprint lang-js"><span id='Ext-fx-target-CompositeSprite'>/**
19 </span> * @class Ext.fx.target.CompositeSprite
20  * @extends Ext.fx.target.Sprite
21
22 This class represents a animation target for a {@link Ext.draw.CompositeSprite}. It allows
23 each {@link Ext.draw.Sprite} in the group to be animated as a whole. In general this class will not be
24 created directly, the {@link Ext.draw.CompositeSprite} will be passed to the animation and
25 and the appropriate target will be created.
26
27  * @markdown
28  */
29
30 Ext.define('Ext.fx.target.CompositeSprite', {
31
32     /* Begin Definitions */
33
34     extend: 'Ext.fx.target.Sprite',
35
36     /* End Definitions */
37
38     getAttr: function(attr, val) {
39         var out = [],
40             target = this.target;
41         target.each(function(sprite) {
42             out.push([sprite, val != undefined ? val : this.getFromPrim(sprite, attr)]);
43         }, this);
44         return out;
45     }
46 });
47 </pre>
48 </body>
49 </html>