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