Performance optimization, icon anchor position

This commit is contained in:
Pieter Vander Vennet 2020-07-27 00:14:34 +02:00
parent 5f0243384c
commit 21280fd156
2 changed files with 24 additions and 13 deletions

View file

@ -228,13 +228,12 @@ export class FilteredLayer {
}
let eventSource = self._storage.addOrGetElement(feature);
const uiElement = self._showOnPopup(eventSource, feature);
const popup = L.popup().setContent(uiElement.Render());
uiElement.Update();
marker.bindPopup(popup);
marker.on("click", () => {
console.log("Popup opened");
uiElement.Activate();
}) // TODO FIX
const popup = L.popup({}, marker).setContent(uiElement.Render());
marker.bindPopup(popup)
.on("popupopen", (popup) => {
uiElement.Activate();
uiElement.Update();
});
return marker;
},