()
| 70 | } |
| 71 | |
| 72 | private restartAnimation(): void { |
| 73 | this.stop(); |
| 74 | if (this.frames.length <= 1) { |
| 75 | return; |
| 76 | } |
| 77 | this.intervalId = setInterval(() => { |
| 78 | this.currentFrame = (this.currentFrame + 1) % this.frames.length; |
| 79 | this.updateDisplay(); |
| 80 | }, this.intervalMs); |
| 81 | } |
| 82 | |
| 83 | private updateDisplay(): void { |
| 84 | const frame = this.frames[this.currentFrame] ?? ""; |
no test coverage detected