ix race condition bug on highlight

This commit is contained in:
EpicKiwi 2026-06-13 14:10:39 +02:00
parent f06c445264
commit 15e5a409c1
Signed by: epickiwi
GPG key ID: C4B28FD2729941CE

View file

@ -124,11 +124,13 @@ function updateActiveFeature(feature_or_featureid){
} }
document.getElementById("result-panel").addEventListener("activePanelChange", e => { document.getElementById("result-panel").addEventListener("activePanelChange", e => {
let activeElement = e.target.children[e.activePanelIndex] if(e.activePanelIndex){
if(activeElement instanceof FeatureElement){ let activeElement = e.target.children[e.activePanelIndex]
let feature = activeElement.feature if(activeElement instanceof FeatureElement){
updateActiveFeature(feature) let feature = activeElement.feature
} else { updateActiveFeature(feature)
MAP.unhighlight_all() } else {
MAP.unhighlight_all()
}
} }
}) })