Keep the simulator fitted to the window and label fixtures on hover.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Sonnet 5.5 committed 2026-10-22 11:44:19 +13:00
1 parent 729a315c7a
commit e2392ecd0b
2 files changed
+34 -9

No files matched your search

+1
View File
@@ -389,6 +389,7 @@ function buildList() {
li.id = `fx-${fixture.id}`; li.id = `fx-${fixture.id}`;
li.className = fixture.kind; li.className = fixture.kind;
li.dataset.id = fixture.id; li.dataset.id = fixture.id;
li.title = fixture.label;
const swatch = document.createElement("span"); const swatch = document.createElement("span");
swatch.className = "swatch"; swatch.className = "swatch";
const name = document.createElement("span"); const name = document.createElement("span");
+33 -9
View File
@@ -21,8 +21,10 @@ html, body {
body { body {
display: grid; display: grid;
grid-template-rows: auto 1fr; grid-template-rows: auto minmax(0, 1fr);
min-height: 100%; height: 100vh;
height: 100dvh;
overflow: hidden;
} }
header { header {
@@ -65,8 +67,10 @@ h2 { font-size: 14px; }
main { main {
display: grid; display: grid;
grid-template-columns: 1fr 300px; grid-template-columns: minmax(0, 1fr) 300px;
grid-template-rows: minmax(0, 1fr);
min-height: 0; min-height: 0;
min-width: 0;
} }
canvas { canvas {
@@ -80,8 +84,11 @@ canvas {
aside { aside {
border-left: 1px solid var(--line); border-left: 1px solid var(--line);
background: var(--panel); background: var(--panel);
overflow: auto; overflow: hidden;
padding: 12px 14px 24px; min-height: 0;
padding: 10px 14px;
display: flex;
flex-direction: column;
} }
ul { ul {
@@ -95,7 +102,7 @@ li {
grid-template-columns: 18px 1fr auto; grid-template-columns: 18px 1fr auto;
gap: 8px; gap: 8px;
align-items: center; align-items: center;
padding: 7px 6px; padding: 4px 6px;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
} }
@@ -115,11 +122,28 @@ li.mover .swatch { border-radius: 3px; }
.name { font-size: 13px; font-weight: 600; } .name { font-size: 13px; font-weight: 600; }
.addr { color: var(--muted); font-size: 11px; } .addr { color: var(--muted); font-size: 11px; }
#detail { margin-top: 16px; } /* with a fixture open, or in a short window, collapse the list to swatches */
aside:has(#detail:not([hidden])) ul { display: flex; flex-wrap: wrap; gap: 4px; }
aside:has(#detail:not([hidden])) li { display: block; padding: 3px; }
aside:has(#detail:not([hidden])) li .name,
aside:has(#detail:not([hidden])) li .addr { display: none; }
@media (max-height: 760px) {
ul { display: flex; flex-wrap: wrap; gap: 4px; }
li { display: block; padding: 3px; }
li .name, li .addr { display: none; }
}
#detail {
margin-top: 12px;
min-height: 0;
overflow: hidden;
}
#channels { #channels {
display: grid; display: grid;
gap: 3px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 2px 10px;
margin-top: 8px; margin-top: 8px;
} }
@@ -153,6 +177,6 @@ li.mover .swatch { border-radius: 3px; }
} }
@media (max-width: 800px) { @media (max-width: 800px) {
main { grid-template-columns: 1fr; grid-template-rows: minmax(280px, 1fr) auto; } main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
aside { border-left: 0; border-top: 1px solid var(--line); max-height: 42vh; } aside { border-left: 0; border-top: 1px solid var(--line); max-height: 42vh; }
} }