[fix](trx-frontend-http): stabilize signal strength field width and BW overlay positioning
Increase sig-strength-display min-width to 7.5rem so the field no longer resizes when the value switches between two-digit and three-digit numbers. Reposition the fast BW overlay immediately when bandwidth changes arrive via SSE, and force-display on bookmark apply so freq+bw render atomically instead of the BW bars wiggling from a stale intermediate state. https://claude.ai/code/session_01R2XBFEBL8CrsTx5inu25MA Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2969,6 +2969,8 @@ function render(update) {
|
||||
currentBandwidthHz = update.filter.bandwidth_hz;
|
||||
window.currentBandwidthHz = currentBandwidthHz;
|
||||
syncBandwidthInput(currentBandwidthHz);
|
||||
// Reposition BW overlay immediately so freq+bw render together.
|
||||
positionFastOverlay(lastFreqHz, currentBandwidthHz);
|
||||
if (window.refreshCwTonePicker) {
|
||||
window.refreshCwTonePicker();
|
||||
}
|
||||
|
||||
@@ -388,7 +388,8 @@ async function bmApply(bm) {
|
||||
++_freqOptimisticSeq;
|
||||
_freqOptimisticHz = bm.freq_hz;
|
||||
}
|
||||
applyLocalTunedFrequency(bm.freq_hz);
|
||||
// Force display so the BW overlay is repositioned even when freq is unchanged.
|
||||
applyLocalTunedFrequency(bm.freq_hz, true);
|
||||
}
|
||||
if (typeof scheduleSpectrumDraw === "function" && typeof lastSpectrumData !== "undefined" && lastSpectrumData) {
|
||||
scheduleSpectrumDraw();
|
||||
|
||||
@@ -629,7 +629,7 @@ button:disabled { opacity: 0.6; cursor: not-allowed; }
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.sig-strength-display {
|
||||
min-width: 5.2rem;
|
||||
min-width: 7.5rem;
|
||||
height: 3.35rem;
|
||||
padding: 0 0.7rem;
|
||||
border: 1px solid var(--border-light);
|
||||
|
||||
Reference in New Issue
Block a user