Fix replay auto toggle handling.
This commit is contained in:
parent
ce804a5c51
commit
b09c3d9369
@ -437,7 +437,7 @@ const INTERFACE = {
|
||||
document.getElementById("indicator-turn").innerText = INTERFACE_DATA.Replay.turn + " / " + INTERFACE_DATA.Game.history.length;
|
||||
document.getElementById("turn-slider").setAttribute("max", INTERFACE_DATA.Game.history.length);
|
||||
|
||||
this.replay_update_button();
|
||||
this.replay_update_auto();
|
||||
} break;
|
||||
}
|
||||
|
||||
@ -1660,6 +1660,7 @@ const INTERFACE = {
|
||||
if(INTERFACE_DATA.Replay.auto) {
|
||||
setTimeout(INTERFACE.replay_auto, 1000);
|
||||
}
|
||||
this.replay_update_auto();
|
||||
},
|
||||
replay_auto() {
|
||||
if(INTERFACE_DATA.Replay.auto) {
|
||||
@ -1670,13 +1671,9 @@ const INTERFACE = {
|
||||
INTERFACE_DATA.Replay.auto = false;
|
||||
}
|
||||
}
|
||||
this.replay_update_button();
|
||||
this.replay_update_auto();
|
||||
},
|
||||
replay_off() {
|
||||
INTERFACE_DATA.Replay.auto = false;
|
||||
this.replay_update_button();
|
||||
},
|
||||
replay_update_button() {
|
||||
replay_update_auto() {
|
||||
let b_auto = document.getElementById("button-auto");
|
||||
if(b_auto !== null) {
|
||||
if(INTERFACE_DATA.Replay.auto) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user