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
reed_sdk-1.0.1 node_modules/concurrently/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts
reed_sdk-1.0.0 node_modules/concurrently/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts
ilog-0.4.1 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
ilog-0.4.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
ilog-0.3.3 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-18.0.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.21.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.20.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.19.1 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.19.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.18.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.17.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.16.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.15.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.14.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.13.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.12.2 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.12.1 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.12.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts
govuk_publishing_components-17.11.0 node_modules/rxjs/src/scheduler/AnimationFrameScheduler.ts