Target.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  7. <script type="text/javascript" src="../resources/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-Target'>/**
  19. </span> * @class Ext.fx.target.Target
  20. This class specifies a generic target for an animation. It provides a wrapper around a
  21. series of different types of objects to allow for a generic animation API.
  22. A target can be a single object or a Composite object containing other objects that are
  23. to be animated. This class and it's subclasses are generally not created directly, the
  24. underlying animation will create the appropriate Ext.fx.target.Target object by passing
  25. the instance to be animated.
  26. The following types of objects can be animated:
  27. - {@link Ext.fx.target.Component Components}
  28. - {@link Ext.fx.target.Element Elements}
  29. - {@link Ext.fx.target.Sprite Sprites}
  30. * @markdown
  31. * @abstract
  32. */
  33. Ext.define('Ext.fx.target.Target', {
  34. isAnimTarget: true,
  35. <span id='Ext-fx-target-Target-method-constructor'> /**
  36. </span> * Creates new Target.
  37. * @param {Ext.Component/Ext.Element/Ext.draw.Sprite} target The object to be animated
  38. */
  39. constructor: function(target) {
  40. this.target = target;
  41. this.id = this.getId();
  42. },
  43. getId: function() {
  44. return this.target.id;
  45. }
  46. });
  47. </pre>
  48. </body>
  49. </html>