Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm2015 / internal / scheduler / AnimationFrameAction.js
1 import { AsyncAction } from './AsyncAction';
2 export class AnimationFrameAction extends AsyncAction {
3     constructor(scheduler, work) {
4         super(scheduler, work);
5         this.scheduler = scheduler;
6         this.work = work;
7     }
8     requestAsyncId(scheduler, id, delay = 0) {
9         if (delay !== null && delay > 0) {
10             return super.requestAsyncId(scheduler, id, delay);
11         }
12         scheduler.actions.push(this);
13         return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(() => scheduler.flush(null)));
14     }
15     recycleAsyncId(scheduler, id, delay = 0) {
16         if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
17             return super.recycleAsyncId(scheduler, id, delay);
18         }
19         if (scheduler.actions.length === 0) {
20             cancelAnimationFrame(id);
21             scheduler.scheduled = undefined;
22         }
23         return undefined;
24     }
25 }
26 //# sourceMappingURL=AnimationFrameAction.js.map