Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AnimationFrameScheduler.js 1.2KB

123456789101112131415161718192021222324252627282930313233
  1. /** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
  2. import * as tslib_1 from "tslib";
  3. import { AsyncScheduler } from './AsyncScheduler';
  4. var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
  5. tslib_1.__extends(AnimationFrameScheduler, _super);
  6. function AnimationFrameScheduler() {
  7. return _super !== null && _super.apply(this, arguments) || this;
  8. }
  9. AnimationFrameScheduler.prototype.flush = function (action) {
  10. this.active = true;
  11. this.scheduled = undefined;
  12. var actions = this.actions;
  13. var error;
  14. var index = -1;
  15. var count = actions.length;
  16. action = action || actions.shift();
  17. do {
  18. if (error = action.execute(action.state, action.delay)) {
  19. break;
  20. }
  21. } while (++index < count && (action = actions.shift()));
  22. this.active = false;
  23. if (error) {
  24. while (++index < count && (action = actions.shift())) {
  25. action.unsubscribe();
  26. }
  27. throw error;
  28. }
  29. };
  30. return AnimationFrameScheduler;
  31. }(AsyncScheduler));
  32. export { AnimationFrameScheduler };
  33. //# sourceMappingURL=AnimationFrameScheduler.js.map