Small fixes, perf improvements, remove duplicate images of ghost bikes, add wall mount

This commit is contained in:
Pieter Vander Vennet 2020-11-15 01:16:35 +01:00
parent 9978879536
commit e74b4e3804
13 changed files with 57 additions and 26 deletions

View file

@ -322,14 +322,9 @@ export class FilteredLayer {
eventSource.addCallback(updateStyle);
function openPopup(e) {
updateStyle()
if (feature.geometry.type === "Point") {
State.state.selectedElement.setData({feature: feature});
return; // Points bind there own popups
return; // Points bind their own popups
}
const uiElement = self._showOnPopup(eventSource, feature);
L.popup({
autoPan: true,
@ -337,14 +332,17 @@ export class FilteredLayer {
.setLatLng(e.latlng)
.openOn(State.state.bm.map);
uiElement.Update();
State.state.selectedElement.setData({feature: feature});
if (e) {
L.DomEvent.stop(e); // Marks the event as consumed
}
}
layer.on("click", openPopup);
layer.on("click", (e) => {
updateStyle();
openPopup(e);
State.state.selectedElement.setData(feature);
});
}
});