CompositeSprite.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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-CompositeSprite'>/**
  19. </span> * @class Ext.fx.target.CompositeSprite
  20. This class represents a animation target for a {@link Ext.draw.CompositeSprite}. It allows
  21. each {@link Ext.draw.Sprite} in the group to be animated as a whole. In general this class will not be
  22. created directly, the {@link Ext.draw.CompositeSprite} will be passed to the animation and
  23. and the appropriate target will be created.
  24. * @markdown
  25. */
  26. Ext.define('Ext.fx.target.CompositeSprite', {
  27. /* Begin Definitions */
  28. extend: 'Ext.fx.target.Sprite',
  29. /* End Definitions */
  30. getAttr: function(attr, val) {
  31. var out = [],
  32. sprites = [].concat(this.target.items),
  33. length = sprites.length,
  34. i,
  35. sprite;
  36. for (i = 0; i &lt; length; i++) {
  37. sprite = sprites[i];
  38. out.push([sprite, val != undefined ? val : this.getFromPrim(sprite, attr)]);
  39. }
  40. return out;
  41. }
  42. });
  43. </pre>
  44. </body>
  45. </html>