dynamicProperties.js 815 B

1234567891011121314151617181920212223242526272829
  1. function DynamicPropertyContainer() {}
  2. DynamicPropertyContainer.prototype = {
  3. addDynamicProperty: function (prop) {
  4. if (this.dynamicProperties.indexOf(prop) === -1) {
  5. this.dynamicProperties.push(prop);
  6. this.container.addDynamicProperty(this);
  7. this._isAnimated = true;
  8. }
  9. },
  10. iterateDynamicProperties: function () {
  11. this._mdf = false;
  12. var i;
  13. var len = this.dynamicProperties.length;
  14. for (i = 0; i < len; i += 1) {
  15. this.dynamicProperties[i].getValue();
  16. if (this.dynamicProperties[i]._mdf) {
  17. this._mdf = true;
  18. }
  19. }
  20. },
  21. initDynamicPropertyContainer: function (container) {
  22. this.container = container;
  23. this.dynamicProperties = [];
  24. this._mdf = false;
  25. this._isAnimated = false;
  26. },
  27. };
  28. export default DynamicPropertyContainer;