Skip to content

Commit

Permalink
fix(#8): 🐛 Elevation needs to be activated upon initiation
Browse files Browse the repository at this point in the history
  • Loading branch information
mariewah committed Oct 14, 2025
1 parent 76a18d8 commit 7fcbf1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ElevationControl/elevationControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,12 @@ export function initElevationControls(viewer, hooks = {}) {
}
})
observer.observe(menu, { childList: true, subtree: true })


//Automatically activate Elevation Control once upon initiation
const btn = document.getElementById('btnDoElevationControl')
if (btn && !btn.dataset.autoClicked) {
btn.dataset.autoClicked = 'true' // prevents double-activation
btn.click()
}
}

0 comments on commit 7fcbf1e

Please sign in to comment.