WebUI: per-signal vscale toolbar, active-signal highlighting, zoom fix

- Per-signal, per-plot vertical scale state (sigVScale keyed by plotId:signalKey)
  so the same signal in two plots has fully independent vscale config
- Active signal redrawn on top of all series with 2× line width for clear
  visual identification; badge click toggles selection and opens/closes the
  embedded vscale toolbar (click same badge again to deselect)
- Vscale configurator moved from floating popup to a slim toolbar strip
  anchored inside the plot card, with an × close button
- Trigger dropdown shows one entry per array signal with [0…N-1] label;
  opening it shows an index-picker dialog to choose the element
- Zoom resampling: when server returns no data for a zoomed range, fall
  back to the local circular buffer instead of returning empty arrays

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino Ferrari
2026-05-27 15:42:00 +02:00
parent b15e637f14
commit 3dd0d863fa
13 changed files with 1508 additions and 231 deletions
+42
View File
@@ -311,6 +311,48 @@ input[type=range].trig-range::-webkit-slider-thumb {
}
.ctx-range { width:80px; }
.ctx-range-val { font-size:11px; color:var(--mauve); min-width:26px; }
.ctx-num {
width:90px; background:var(--surface0); border:1px solid var(--surface1); border-radius:4px;
color:var(--text); font-size:11px; padding:2px 6px;
}
.ctx-num:focus { outline:none; border-color:var(--accent); }
.ctx-btn:disabled { opacity:0.35; cursor:not-allowed; border-color:var(--surface1); }
/* ── Array index picker ─────────────────────────────────────────── */
#array-idx-picker {
position:fixed; z-index:300;
background:var(--mantle); border:1px solid var(--surface1); border-radius:var(--radius);
box-shadow:0 8px 24px rgba(0,0,0,0.6); padding:10px; min-width:200px;
}
/* ── VScale toolbar (embedded in plot card) ──────────────────────── */
#vscale-menu {
flex-shrink:0; background:rgba(17,17,27,0.92); border-top:1px solid var(--surface1);
padding:3px 8px;
}
.vstb-header {
display:flex; align-items:center; gap:8px; flex-wrap:nowrap; overflow-x:auto;
scrollbar-width:none;
}
.vstb-header::-webkit-scrollbar { display:none; }
.vstb-label { font-size:11px; color:var(--subtext0); white-space:nowrap; flex-shrink:0; }
.vstb-lbl { font-size:10px; color:var(--overlay0); white-space:nowrap; }
.vstb-close {
margin-left:auto; flex-shrink:0;
background:transparent; border:none; color:var(--overlay0);
cursor:pointer; font-size:11px; padding:0 3px; line-height:1;
transition:color var(--transition);
}
.vstb-close:hover { color:var(--red); }
.plot-vscale-bar { display:none; }
/* ── Badge vscale info & active state ───────────────────────────── */
.vscale-info {
font-size:9px; color:var(--overlay0); font-family:monospace; margin-left:2px; white-space:nowrap;
}
.sig-badge { cursor:pointer; }
.sig-badge-active { outline:1px solid rgba(255,255,255,0.35); background:rgba(88,91,112,0.9); }
.sig-badge-active .vscale-info { color:var(--subtext0); }
/* ── Source groups ────────────────────────────────────────────── */
.source-group { margin-bottom:2px; }