diff options
Diffstat (limited to 'node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js')
| -rw-r--r-- | node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js new file mode 100644 index 0000000..6807452 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js @@ -0,0 +1,30 @@ +import { AsyncScheduler } from './AsyncScheduler'; +export class AnimationFrameScheduler extends AsyncScheduler { + flush(action) { + this._active = true; + let flushId; + if (action) { + flushId = action.id; + } + else { + flushId = this._scheduled; + this._scheduled = undefined; + } + const { actions } = this; + let error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + } +} +//# sourceMappingURL=AnimationFrameScheduler.js.map
\ No newline at end of file |
