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 803B

12345678910111213141516171819202122232425
  1. import { AsyncScheduler } from './AsyncScheduler';
  2. export class AnimationFrameScheduler extends AsyncScheduler {
  3. flush(action) {
  4. this.active = true;
  5. this.scheduled = undefined;
  6. const { actions } = this;
  7. let error;
  8. let index = -1;
  9. let count = actions.length;
  10. action = action || actions.shift();
  11. do {
  12. if (error = action.execute(action.state, action.delay)) {
  13. break;
  14. }
  15. } while (++index < count && (action = actions.shift()));
  16. this.active = false;
  17. if (error) {
  18. while (++index < count && (action = actions.shift())) {
  19. action.unsubscribe();
  20. }
  21. throw error;
  22. }
  23. }
  24. }
  25. //# sourceMappingURL=AnimationFrameScheduler.js.map