forked from MapComplete/MapComplete
Tweaks to popup closing behaviour
This commit is contained in:
parent
baf41cb79d
commit
5523603e70
3 changed files with 29 additions and 12 deletions
|
@ -278,8 +278,10 @@ export class InitUiElements {
|
|||
checkbox.isEnabled.setData(false);
|
||||
})
|
||||
|
||||
State.state.selectedElement.addCallback(() => {
|
||||
checkbox.isEnabled.setData(false);
|
||||
State.state.selectedElement.addCallback(selected => {
|
||||
if(selected !== undefined){
|
||||
checkbox.isEnabled.setData(false);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
@ -367,11 +369,6 @@ export class InitUiElements {
|
|||
attr
|
||||
);
|
||||
State.state.leafletMap.setData(bm.map);
|
||||
|
||||
bm.map.on("popupclose", () => {
|
||||
State.state.selectedElement.setData(undefined)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
private static InitLayers() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue