Fix self-closing popup
This commit is contained in:
parent
93a16944a3
commit
489c6fc3c0
1 changed files with 5 additions and 0 deletions
|
@ -69,6 +69,10 @@ export default class ShowDataLayer {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Hash.hash.addCallback(id => {
|
Hash.hash.addCallback(id => {
|
||||||
|
// This is a bit of an edge case: if the hash becomes an id to search, we have to show the corresponding popup
|
||||||
|
if(State.state.selectedElement !== undefined){
|
||||||
|
return; // Something is already selected, we don't have to apply this fix
|
||||||
|
}
|
||||||
const action = self._onSelectedTrigger[id];
|
const action = self._onSelectedTrigger[id];
|
||||||
if(action){
|
if(action){
|
||||||
action();
|
action();
|
||||||
|
@ -144,6 +148,7 @@ export default class ShowDataLayer {
|
||||||
}
|
}
|
||||||
leafletLayer.openPopup();
|
leafletLayer.openPopup();
|
||||||
uiElement.Activate();
|
uiElement.Activate();
|
||||||
|
State.state.selectedElement.setData(feature);
|
||||||
}
|
}
|
||||||
this._onSelectedTrigger[feature.properties.id.replace("/","_")] = this._onSelectedTrigger[id];
|
this._onSelectedTrigger[feature.properties.id.replace("/","_")] = this._onSelectedTrigger[id];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue