Performance improvements

This commit is contained in:
Pieter Vander Vennet 2021-02-05 16:32:37 +01:00
parent 49f78d5604
commit 8f8ef690a4
11 changed files with 125 additions and 101 deletions

View file

@ -116,12 +116,12 @@ export default class ShowDataLayer {
const popup = L.popup({
autoPan: true,
closeOnEscapeKey: true,
closeButton: false
}, leafletLayer);
const tags = State.state.allElements.getEventSourceFor(feature);
const uiElement: LazyElement<UIElement> = new LazyElement(() =>new Combine([ new FeatureInfoBox(tags, layer, () => {
console.log("Closing the popup!")
State.state.selectedElement.setData(undefined);
popup.remove();