MCPcopy Index your code
hub / github.com/microsoft/SandDance / animationQueue

Method animationQueue

packages/vega-deck.gl/src/presenter.ts:124–135  ·  view source on GitHub ↗

* Stops the current animation and queues a new animation. * @param handler Function to invoke when timeout is complete. * @param timeout Length of time to wait before invoking the handler. * @param options Optional QueuedAnimationOptions object.

(handler: () => void, timeout: number, options?: QueuedAnimationOptions)

Source from the content-addressed store, hash-verified

122 * @param options Optional QueuedAnimationOptions object.
123 */
124 animationQueue(handler: () => void, timeout: number, options?: QueuedAnimationOptions) {
125 if (this.logger) {
126 this.logger(`queueing animation ${(options && options.waitingLabel) || 'waiting'}...`);
127 }
128 this.animationCancel();
129 this.animationTimer = setTimeout(() => {
130 if (this.logger) {
131 this.logger(`queueing animation ${(options && options.handlerLabel) || 'handler'}...`);
132 }
133 handler();
134 }, timeout) as any as number;
135 }
136
137 /**
138 * Retrieve a sub-element of the rendered output.

Callers 2

onAnimateDataChangeMethod · 0.45
renderMethod · 0.45

Calls 2

animationCancelMethod · 0.95
handlerFunction · 0.50

Tested by

no test coverage detected