[fix](trx-frontend-http): move spectrum shift arrows onto scale

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-19 00:38:31 +01:00
parent 9c6ccd626d
commit 5d0794924b
3 changed files with 26 additions and 16 deletions
@@ -8935,8 +8935,17 @@ function updateSpectrumFreqAxis(range) {
const firstHz = Math.ceil(range.visLoHz / stepHz) * stepHz;
spectrumFreqAxis.innerHTML = "";
const leftShiftBtn = document.getElementById("spectrum-center-left-btn");
const rightShiftBtn = document.getElementById("spectrum-center-right-btn");
if (leftShiftBtn) spectrumFreqAxis.appendChild(leftShiftBtn);
if (rightShiftBtn) spectrumFreqAxis.appendChild(rightShiftBtn);
const axisWidth = spectrumFreqAxis.clientWidth || 0;
const edgePad = 6;
const buttonReserve = Math.max(
leftShiftBtn?.offsetWidth || 0,
rightShiftBtn?.offsetWidth || 0,
0,
);
const edgePad = Math.max(6, buttonReserve + 10);
for (let hz = firstHz; hz <= range.visHiHz + stepHz * 0.01; hz += stepHz) {
const frac = (hz - range.visLoHz) / range.visSpanHz;
if (frac < 0 || frac > 1) continue;