Target.js 1.0 KB

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