diff --git a/static/dashboard.js b/static/dashboard.js index db066e2..17505db 100644 --- a/static/dashboard.js +++ b/static/dashboard.js @@ -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; diff --git a/static/style.css b/static/style.css index 1e1fad8..dd4a5f7 100644 --- a/static/style.css +++ b/static/style.css @@ -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; }