Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / src / fx / target / Target.js
1 /**
2  * @class Ext.fx.target.Target
3
4 This class specifies a generic target for an animation. It provides a wrapper around a
5 series of different types of objects to allow for a generic animation API.
6 A target can be a single object or a Composite object containing other objects that are 
7 to be animated. This class and it's subclasses are generally not created directly, the 
8 underlying animation will create the appropriate Ext.fx.target.Target object by passing 
9 the instance to be animated.
10
11 The following types of objects can be animated:
12 - {@link #Ext.fx.target.Component Components}
13 - {@link #Ext.fx.target.Element Elements}
14 - {@link #Ext.fx.target.Sprite Sprites}
15
16  * @markdown
17  * @abstract
18  * @constructor
19  * @param {Mixed} target The object to be animated
20  */
21
22 Ext.define('Ext.fx.target.Target', {
23
24     isAnimTarget: true,
25
26     constructor: function(target) {
27         this.target = target;
28         this.id = this.getId();
29     },
30     
31     getId: function() {
32         return this.target.id;
33     }
34 });