Skip to content

Commit

Permalink
move to event subscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
notTamion committed Dec 24, 2024
1 parent afbc619 commit 14bd046
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions frontend/src/ts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -907,11 +907,8 @@ export function setTapeMode(
return false;
}

if (mode !== "off") {
if (mode !== "off" && config.showAllLines) {
setShowAllLines(false, true);
$("#liveStatsMini").css("display", "flex").css("justify-content", "center");
} else {
$("#liveStatsMini").css("display", "").css("justify-content", "");
}

config.tapeMode = mode;
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/ts/test/test-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,12 @@ ConfigEvent.subscribe((eventKey, eventValue, nosave) => {
if (eventKey === "tapeMode" && !nosave) {
if (eventValue === "off") {
$("#words").css("margin-left", "unset");
$("#liveStatsMini").css("display", "").css("justify-content", "");
} else {
scrollTape();
$("#liveStatsMini")
.css("display", "flex")
.css("justify-content", "center");
}
}

Expand Down

0 comments on commit 14bd046

Please sign in to comment.