[fix](trx-frontend): fix CW picker visibility and widen tone range

Fix CW picker redraw when the decoder sub-tab becomes visible to avoid
white/blank canvas rendering.
Widen CW tone picker/input range to 100-10000 Hz and raise CW/CWR
bandwidth max to 9 kHz.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-04 23:04:56 +01:00
parent 878b50cad7
commit d8f7ebafa0
3 changed files with 26 additions and 15 deletions
@@ -2937,8 +2937,8 @@ lockBtn.addEventListener("click", async () => {
// Per-mode defaults: [default bandwidth Hz, min Hz, max Hz, step Hz]
const MODE_BW_DEFAULTS = {
CW: [500, 50, 2_000, 50],
CWR: [500, 50, 2_000, 50],
CW: [500, 100, 9_000, 50],
CWR: [500, 100, 9_000, 50],
LSB: [2_700, 300, 6_000, 100],
USB: [2_700, 300, 6_000, 100],
AM: [9_000, 500, 20_000, 500],
@@ -4987,7 +4987,13 @@ document.querySelectorAll(".sub-tab-bar").forEach((bar) => {
btn.classList.add("active");
const parent = bar.parentElement;
parent.querySelectorAll(".sub-tab-panel").forEach((p) => p.style.display = "none");
parent.querySelector(`#subtab-${btn.dataset.subtab}`).style.display = "";
const nextPanel = parent.querySelector(`#subtab-${btn.dataset.subtab}`);
if (nextPanel) nextPanel.style.display = "";
if (btn.dataset.subtab === "cw" && window.refreshCwTonePicker) {
requestAnimationFrame(() => {
if (window.refreshCwTonePicker) window.refreshCwTonePicker();
});
}
});
});