Skip to content

Commit

Permalink
refactor(#48): ♻️ Make elevation control button and accepted filter b…
Browse files Browse the repository at this point in the history
…utton more intuitive
  • Loading branch information
kleinc committed Nov 2, 2025
1 parent 73059de commit 1d5c5de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Filter/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1d5c5de

Please sign in to comment.