Sha256: 1cba64f60a65f78c0a6732087519c46f29aff28473c9195dcee9fce65c5e7d2f

Contents?: true

Size: 756 Bytes

Versions: 53

Compression:

Stored size: 756 Bytes

Contents

import { AsyncAction } from './AsyncAction';
import { AsyncScheduler } from './AsyncScheduler';

export class AnimationFrameScheduler extends AsyncScheduler {
  public flush(action?: AsyncAction<any>): void {

    this.active = true;
    this.scheduled = undefined;

    const {actions} = this;
    let error: any;
    let index: number = -1;
    let count: number = actions.length;
    action = action || actions.shift();

    do {
      if (error = action.execute(action.state, action.delay)) {
        break;
      }
    } while (++index < count && (action = actions.shift()));

    this.active = false;

    if (error) {
      while (++index < count && (action = actions.shift())) {
        action.unsubscribe();
      }
      throw error;
    }
  }
}

Version data entries

53 entries across 51 versions & 5 rubygems

Version Path
govuk_publishing_components-16.23.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-16.22.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-16.21.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-16.20.1 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-16.20.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-16.19.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-16.18.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-16.17.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/inquirer/node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
locomotivecms-3.4.0 app/javascript/node_modules/listr/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts
locomotivecms-3.4.0 app/javascript/node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
dragonfly_puppeteer-0.1.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts