Method
setIndicator
(indicator?: LoaderIndicatorOptions)
Source from the content-addressed store, hash-verified
| 62 | } |
| 63 | |
| 64 | setIndicator(indicator?: LoaderIndicatorOptions): void { |
| 65 | this.renderIndicatorVerbatim = indicator !== undefined; |
| 66 | this.frames = indicator?.frames !== undefined ? [...indicator.frames] : [...DEFAULT_FRAMES]; |
| 67 | this.intervalMs = indicator?.intervalMs && indicator.intervalMs > 0 ? indicator.intervalMs : DEFAULT_INTERVAL_MS; |
| 68 | this.currentFrame = 0; |
| 69 | this.start(); |
| 70 | } |
| 71 | |
| 72 | private restartAnimation(): void { |
| 73 | this.stop(); |
Tested by
no test coverage detected