From 69767d017290b8ace07ac63f532cefb112b99d45 Mon Sep 17 00:00:00 2001 From: yandrik Date: Thu, 23 Oct 2025 18:11:30 +0200 Subject: [PATCH] feat: button thing --- app.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 67dfc65..904114f 100644 --- a/app.js +++ b/app.js @@ -158,6 +158,7 @@ function addSightMarker(sight, number) { // Create popup content for markers function createPopupContent(sight) { const icon = categoryIcons[sight.category] || "📍"; + const isSelected = selectedSights.has(sight.id); return ` `; @@ -278,7 +283,13 @@ function toggleSightSelection(sightId) { } else { selectedSights.add(sightId); } - + + // Update the popup content for this sight's marker + const marker = markers.find(m => m.sightData && m.sightData.id === sightId); + if (marker) { + marker.setPopupContent(createPopupContent(marker.sightData)); + } + updateRouteDisplay(); renderSightsList(getCurrentFilter(), getCurrentSearch()); }