* 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)
| 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. |
no test coverage detected