Refresh timers when morphing happens
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user