CompositeElement2.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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-CompositeElement'>/**
  19. </span> * @class Ext.fx.target.CompositeElement
  20. *
  21. * This class represents a animation target for a {@link Ext.CompositeElement}. It allows
  22. * each {@link Ext.Element} in the group to be animated as a whole. In general this class will not be
  23. * created directly, the {@link Ext.CompositeElement} will be passed to the animation and
  24. * and the appropriate target will be created.
  25. */
  26. Ext.define('Ext.fx.target.CompositeElement', {
  27. /* Begin Definitions */
  28. extend: 'Ext.fx.target.Element',
  29. /* End Definitions */
  30. <span id='Ext-fx-target-CompositeElement-property-isComposite'> /**
  31. </span> * @property {Boolean} isComposite
  32. * `true` in this class to identify an object as an instantiated CompositeElement, or subclass thereof.
  33. */
  34. isComposite: true,
  35. constructor: function(target) {
  36. target.id = target.id || Ext.id(null, 'ext-composite-');
  37. this.callParent([target]);
  38. },
  39. getAttr: function(attr, val) {
  40. var out = [],
  41. elements = this.target.elements,
  42. length = elements.length,
  43. i,
  44. el;
  45. for (i = 0; i &lt; length; i++) {
  46. el = elements[i];
  47. if (el) {
  48. el = this.target.getElement(el);
  49. out.push([el, this.getElVal(el, attr, val)]);
  50. }
  51. }
  52. return out;
  53. }
  54. });
  55. </pre>
  56. </body>
  57. </html>