Skip to content

Commit ab17397

Browse files
[visualizer] fix canvas not being centered in no ui mode
1 parent 6bfbb45 commit ab17397

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

visualizer/src/css/styles.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ a {
189189
grid-template-rows: 1fr max-content 1fr;
190190
place-items: center;
191191
}
192+
:root[data-ui="off"] .game-area {
193+
grid-template-columns: 1fr;
194+
grid-template-rows: 1fr;
195+
}
192196

193197
#team-one-name {
194198
place-self: start end;

visualizer/src/ts/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ window.addEventListener("DOMContentLoaded", async () => {
9090

9191
// disable ui if specified
9292
if (urlParams.get("ui") === "false") {
93+
document.documentElement.setAttribute("data-ui", "off");
9394
document.querySelectorAll<HTMLElement>(".ui").forEach((el) => {
9495
el.style.display = "none";
9596
});

0 commit comments

Comments
 (0)