From 1d5c5dedc1ed5c87ead242b1697f7fcdc889374d Mon Sep 17 00:00:00 2001 From: Kleinc Date: Sun, 2 Nov 2025 10:09:25 +0100 Subject: [PATCH] refactor(#48): :recycle: Make elevation control button and accepted filter button more intuitive --- src/Filter/filter.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Filter/filter.js b/src/Filter/filter.js index cdea1f8..981b6a8 100644 --- a/src/Filter/filter.js +++ b/src/Filter/filter.js @@ -189,6 +189,10 @@ function ensureElevationButton(hooks) { btn.type = 'button' btn.textContent = 'Activate elevation control' btn.addEventListener('click', () => { + const elevBtn = byId('btnDoElevationControl') + const accBtn = byId('doAcceptedFiltering') + if (elevBtn) elevBtn.style.display = 'none' + if (accBtn) accBtn.style.display = '' switchMode('elevation', hooks?.onActivateElevation, hooks) }) btns.appendChild(btn) @@ -283,6 +287,10 @@ function ensureAcceptedButton(hooks) { btn.type = 'button' btn.textContent = 'Activate accepted filter' btn.addEventListener('click', () => { + const accBtn = byId('doAcceptedFiltering') + const elevBtn = byId('btnDoElevationControl') + if (accBtn) accBtn.style.display = 'none' + if (elevBtn) elevBtn.style.display = '' switchMode('accepted', hooks?.onActivateAccepted, hooks) }) btns.appendChild(btn)