[fix](trx-frontend-http): fix waterfall updates and bookmark top anchoring

Ensure overview waterfall incremental updates continue on HiDPI and anchor bookmark chips to the top of the full spectrum view (waterfall + waveform).\n\nCo-authored-by: OpenAI Codex <codex@openai.com>

Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-05 21:45:49 +01:00
parent c4f0844137
commit 4e6a800391
2 changed files with 6 additions and 3 deletions
@@ -1011,7 +1011,6 @@ function drawOverviewWaterfall(W, H, pal) {
const palKey = overviewWfPaletteKey(pal, viewKey); const palKey = overviewWfPaletteKey(pal, viewKey);
const rowStride = iW * 4; const rowStride = iW * 4;
const expectedSize = iW * iH * 4; const expectedSize = iW * iH * 4;
const steadyState = rows.length >= maxVisible;
const newPushes = overviewWaterfallPushCount - overviewWfTexPushCount; const newPushes = overviewWaterfallPushCount - overviewWfTexPushCount;
const sizeChanged = overviewWfTexWidth !== iW || overviewWfTexHeight !== iH; const sizeChanged = overviewWfTexWidth !== iW || overviewWfTexHeight !== iH;
const palChanged = overviewWfTexPalKey !== palKey; const palChanged = overviewWfTexPalKey !== palKey;
@@ -1046,7 +1045,7 @@ function drawOverviewWaterfall(W, H, pal) {
} }
overviewWfTexPushCount = overviewWaterfallPushCount; overviewWfTexPushCount = overviewWaterfallPushCount;
overviewWfTexPalKey = palKey; overviewWfTexPalKey = palKey;
} else if (steadyState && newPushes > 0) { } else if (newPushes > 0) {
const newCount = Math.min(newPushes, iH); const newCount = Math.min(newPushes, iH);
if (newCount >= iH) { if (newCount >= iH) {
for (let y = 0; y < iH; y++) renderRow(y, rows[y]); for (let y = 0; y < iH; y++) renderRow(y, rows[y]);
@@ -6715,6 +6714,10 @@ function createBookmarkChip(bm, colorMap, options = {}) {
span.className = "spectrum-bookmark-chip"; span.className = "spectrum-bookmark-chip";
if (options.sideStack) { if (options.sideStack) {
span.classList.add("spectrum-bookmark-chip-side"); span.classList.add("spectrum-bookmark-chip-side");
} else {
// Keep main in-band bookmark chips pinned at the very top of the spectrum strip.
span.style.top = "2px";
span.style.transform = "translateX(-50%)";
} }
span.title = buildBookmarkTooltipText(bm) || (bm.name + " \u2014 " + freqStr + (bm.comment ? "\n" + bm.comment : "")); span.title = buildBookmarkTooltipText(bm) || (bm.name + " \u2014 " + freqStr + (bm.comment ? "\n" + bm.comment : ""));
span.dataset.bmId = bm.id; span.dataset.bmId = bm.id;
@@ -2296,7 +2296,7 @@ button:focus-visible, input:focus-visible, select:focus-visible {
} }
#spectrum-bookmark-axis { #spectrum-bookmark-axis {
position: absolute; position: absolute;
top: 0; top: calc(-1 * var(--overview-plot-height));
left: 0; left: 0;
right: 0; right: 0;
z-index: 8; z-index: 8;