Dashboard levels: group line only as wide as its meters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
936d7f64a9
commit
967191f2f7
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -64,7 +64,7 @@ function dashGroups(d, kind) {
|
||||
if (n && g[n - 1] === j - 1) return;
|
||||
let len = 1;
|
||||
while (g.includes(j + len)) len++;
|
||||
out.push(h("div", { class: "dgrp", style: `--lc:${color};grid-column:${j + 1} / span ${len}`, title: (name ? name + " · " : "") + g.map(i => chLabel(kind, i)).join(" + ") }, name));
|
||||
out.push(h("div", { class: "dgrp", style: `--lc:${color};--len:${len};grid-column:${j + 1} / span ${len}`, title: (name ? name + " · " : "") + g.map(i => chLabel(kind, i)).join(" + ") }, len > 1 ? name : "")); // a single meter has no room for the name
|
||||
});
|
||||
});
|
||||
return out;
|
||||
|
||||
+1
-1
@@ -834,7 +834,7 @@ body.ddragging { user-select: none; -webkit-user-select: none; cursor: grabbing;
|
||||
.dms { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-template-rows: 0 minmax(0, 1fr); gap: 0 4px; }
|
||||
.dmeters.hasbands .dms { grid-template-rows: 18px minmax(0, 1fr); }
|
||||
.dms > .dm { grid-row: 2; }
|
||||
.dgrp { grid-row: 1; align-self: end; min-width: 0; margin-bottom: 4px; padding-bottom: 1px; border-bottom: 2px solid var(--lc); color: var(--lc);
|
||||
.dgrp { grid-row: 1; align-self: end; min-width: 0; margin: 0 calc(((100% + 4px) / var(--len) - 16px) / 2) 4px; padding-bottom: 1px; border-bottom: 2px solid var(--lc); color: var(--lc);
|
||||
font-size: 9px; line-height: 11px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.dm { --cc: var(--warn); display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 0; }
|
||||
.dm .led { flex: 1 1 0; height: auto; min-height: 0; padding: 0; }
|
||||
|
||||
Reference in new issue
Block a user