ix race condition bug on highlight
This commit is contained in:
parent
f06c445264
commit
15e5a409c1
1 changed files with 8 additions and 6 deletions
14
js/index.js
14
js/index.js
|
|
@ -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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue