From 634f4e316ac240038c8d0948854bdc2a3da7c83b Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Fri, 1 Oct 2021 02:57:26 +0200 Subject: [PATCH] Prevent loops when two features with the same id are shown at the same time --- UI/ShowDataLayer/ShowDataLayer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UI/ShowDataLayer/ShowDataLayer.ts b/UI/ShowDataLayer/ShowDataLayer.ts index ade1860aea..e180cdf5d3 100644 --- a/UI/ShowDataLayer/ShowDataLayer.ts +++ b/UI/ShowDataLayer/ShowDataLayer.ts @@ -223,7 +223,9 @@ export default class ShowDataLayer { popup.setContent(`
Rendering
`) leafletLayer.on("popupopen", () => { - State.state.selectedElement.setData(feature) + if(State.state.selectedElement.data?.properties?.id !== feature.properties.id){ + State.state.selectedElement.setData(feature) + } if (infobox === undefined) { const tags = State.state.allElements.getEventSourceById(feature.properties.id);