MCPcopy Create free account
hub / github.com/angular/angular / scheduleAnimationQueue

Function scheduleAnimationQueue

packages/core/src/animation/queue.ts:87–103  ·  view source on GitHub ↗
(injector: Injector)

Source from the content-addressed store, hash-verified

85}
86
87export function scheduleAnimationQueue(injector: Injector) {
88 const animationQueue = injector.get(ANIMATION_QUEUE);
89 // We only want to schedule the animation queue if it hasn't already been scheduled.
90 if (!animationQueue.isScheduled) {
91 afterNextRender(
92 () => {
93 animationQueue.isScheduled = false;
94 for (let animateFn of animationQueue.queue) {
95 animateFn();
96 }
97 animationQueue.queue.clear();
98 },
99 {injector: animationQueue.injector},
100 );
101 animationQueue.isScheduled = true;
102 }
103}
104
105export function initializeAnimationQueueScheduler(injector: Injector) {
106 const animationQueue = injector.get(ANIMATION_QUEUE);

Callers

nothing calls this directly

Calls 4

afterNextRenderFunction · 0.90
animateFnFunction · 0.85
getMethod · 0.65
clearMethod · 0.45

Tested by

no test coverage detected