feat(http-frontend): move spectrum above controls, add zoom/pan/tooltip

Spectrum panel is now placed above the freq/mode/jog row, spanning the
full card width. Key improvements:

- Scroll wheel zooms in/out at the cursor position (up to 64x); double-
  click resets to full bandwidth view.
- Mouse drag pans the visible window; click-to-tune is suppressed when a
  drag has occurred.
- Touch pinch-to-zoom and single-finger drag-to-pan supported.
- Hover tooltip shows the frequency under the cursor, formatted to the
  currently selected unit (MHz/kHz/Hz, matching the jog-step selection).
- Frequency axis labels update to reflect the zoomed visible range.
- Canvas height increased to 160 px; axis bar styled with card bg.
- A small hint line below the panel explains the controls.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-02-27 21:49:07 +01:00
parent 952961b9fd
commit 547f253837
3 changed files with 292 additions and 100 deletions
@@ -586,17 +586,22 @@ button:focus-visible, input:focus-visible, select:focus-visible {
/* ── Spectrum display ─────────────────────────────────────────────────── */
#spectrum-panel {
margin-bottom: 0.9rem;
}
.spectrum-wrap {
position: relative;
width: 100%;
user-select: none;
}
#spectrum-canvas {
display: block;
width: 100%;
height: 120px;
height: 160px;
background: #0a0f18;
border-radius: 4px;
border-radius: 6px 6px 0 0;
cursor: crosshair;
touch-action: none;
}
#spectrum-freq-axis {
position: relative;
@@ -604,10 +609,35 @@ button:focus-visible, input:focus-visible, select:focus-visible {
width: 100%;
font-size: 0.7rem;
color: var(--text-muted);
user-select: none;
background: var(--bg-secondary);
border-radius: 0 0 6px 6px;
border: 1px solid var(--border);
border-top: none;
}
#spectrum-freq-axis span {
position: absolute;
transform: translateX(-50%);
white-space: nowrap;
top: 2px;
}
#spectrum-tooltip {
display: none;
position: absolute;
pointer-events: none;
background: rgba(10,15,24,0.85);
color: #00e676;
font-size: 0.75rem;
font-family: monospace;
padding: 2px 6px;
border-radius: 4px;
border: 1px solid rgba(0,230,118,0.3);
white-space: nowrap;
z-index: 10;
}
#spectrum-hint {
font-size: 0.68rem;
color: var(--text-muted);
text-align: right;
margin-top: 2px;
opacity: 0.6;
}