Refresh timers when morphing happens

This commit is contained in:
Jorge Manrubia
2025-04-11 13:05:56 +02:00
parent 4e91d8a666
commit ba6eab509c
2 changed files with 9 additions and 1 deletions
@@ -24,6 +24,14 @@ export default class extends Controller {
clearInterval(this.#timer)
}
refreshAll() {
this.constructor.targets.forEach(targetName => {
this.targets.findAll(targetName).forEach(target => {
this.#formatTime(this[`${targetName}Formatter`], target)
})
})
}
timeTargetConnected(target) {
this.#formatTime(this.timeFormatter, target)
}