diff --git a/tourenplan-mit-tram.html b/tourenplan-mit-tram.html index 2ad548c..7089060 100644 --- a/tourenplan-mit-tram.html +++ b/tourenplan-mit-tram.html @@ -124,11 +124,15 @@ .layer-toggle { margin-top: 8px; padding-top: 6px; border-top: 1px solid #555; font-size: 12px; } .layer-toggle label { display: flex; align-items: center; gap: 6px; margin: 3px 0; cursor: pointer; user-select: none; color: #eee; } .layer-toggle input { cursor: pointer; } - .legend { background: var(--card-bg); padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,0.4); border: 1px solid var(--card-border); max-width: 240px; backdrop-filter: blur(8px); } - .legend h4 { margin: 0 0 8px 0; font-size: 14px; } - .legend .item { display: flex; align-items: center; gap: 8px; margin: 4px 0; } - .legend .emoji { font-size: 18px; } - .legend .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid white; } + .legend { background: var(--card-bg); padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,0.4); border: 1px solid var(--card-border); max-width: 220px; backdrop-filter: blur(8px); } + .legend h4 { margin: 0; font-size: 13px; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 6px; } + .legend h4 .toggle { margin-left: auto; font-size: 10px; opacity: 0.6; transition: transform 0.2s; } + .legend.open h4 .toggle { transform: rotate(180deg); } + .legend .body { display: none; margin-top: 8px; max-height: 280px; overflow-y: auto; } + .legend.open .body { display: block; } + .legend .item { display: flex; align-items: center; gap: 6px; margin: 3px 0; font-size: 12px; } + .legend .emoji { font-size: 14px; } + .legend .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid white; flex-shrink: 0; } .popup-content { font-family: -apple-system, BlinkMacSystemFont, sans-serif; min-width: 220px; } .popup-content .emoji-big { font-size: 28px; margin-right: 8px; } .popup-content h3 { margin: 0 0 6px 0; font-size: 16px; color: #1a1a1a; } @@ -916,43 +920,30 @@ const legend = L.control({ position: 'bottomright' }); legend.onAdd = function() { const div = L.DomUtil.create('div', 'legend'); div.innerHTML = ` -

πŸ₯³ JGA Prag Tourenplan

-
🏨 Hotel Uno (Basis)
-
πŸ” Escape Room
-
🏎️ KartPlanet
-
β›³ Minigolf
-
🎳 Bowling
-
πŸ‘» Geister-Tour
-
🎯 Schießstand
-
β›΅ Beer Boat
-
🎨 Paintball
-
πŸ”« Lasertag
-
πŸ” Enigma
-
-
Filter
- - - - -
-
- πŸš‡ Metro: A Β· - B Β· - C
- πŸš‹ Tram: eine Linie zur Zeit wΓ€hlen (Radio)
- Marker anklicken fΓΌr Details +

πŸ“ Legendeβ–Ό

+
+
🏨 Hotel Uno
+
πŸ” Escape Room
+
🏎️ KartPlanet
+
β›³ Minigolf
+
🎳 Bowling
+
πŸ‘» Geister-Tour
+
🎯 Schießstand
+
β›΅ Beer Boat
+
🎨 Paintball
+
πŸ”« Lasertag
+
πŸ” Enigma
+
+ πŸš‡ Metro: + A Β· + B Β· + C +   πŸš‹ Tram: Radio +
`; - setTimeout(() => { - div.querySelectorAll('input[data-layer]').forEach(cb => { - cb.addEventListener('change', () => { - const layer = cb.dataset.layer; - (markersByCategory[layer] || []).forEach(m => { - if (cb.checked) m.addTo(map); else map.removeLayer(m); - }); - }); - }); - }, 10); + L.DomEvent.disableClickPropagation(div); + L.DomEvent.disableScrollPropagation(div); return div; }; legend.addTo(map); diff --git a/tourenplan.html b/tourenplan.html index c4f1d4d..e30c025 100644 --- a/tourenplan.html +++ b/tourenplan.html @@ -139,11 +139,15 @@ .layer-toggle input { cursor: pointer; } /* Legende */ -.legend { background: var(--card-bg); padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,0.4); border: 1px solid var(--card-border); max-width: 240px; backdrop-filter: blur(8px); } -.legend h4 { margin: 0 0 8px 0; font-size: 14px; color: var(--text); } -.legend .item { display: flex; align-items: center; gap: 8px; margin: 4px 0; color: var(--text); } -.legend .emoji { font-size: 18px; } -.legend .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid white; } +.legend { background: var(--card-bg); padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,0.4); border: 1px solid var(--card-border); max-width: 220px; backdrop-filter: blur(8px); } +.legend h4 { margin: 0; font-size: 13px; color: var(--text); cursor: pointer; user-select: none; display: flex; align-items: center; gap: 6px; } +.legend h4 .toggle { margin-left: auto; font-size: 10px; opacity: 0.6; transition: transform 0.2s; } +.legend.open h4 .toggle { transform: rotate(180deg); } +.legend .body { display: none; margin-top: 8px; max-height: 280px; overflow-y: auto; } +.legend.open .body { display: block; } +.legend .item { display: flex; align-items: center; gap: 6px; margin: 3px 0; color: var(--text); font-size: 12px; } +.legend .emoji { font-size: 14px; } +.legend .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid white; flex-shrink: 0; } .popup-content { font-family: -apple-system, BlinkMacSystemFont, sans-serif; min-width: 220px; } .popup-content .emoji-big { font-size: 28px; margin-right: 8px; } .popup-content h3 { margin: 0 0 6px 0; font-size: 16px; color: #1a1a1a; } @@ -553,27 +557,31 @@ const legend = L.control({ position: 'bottomright' }); legend.onAdd = function() { const div = L.DomUtil.create('div', 'legend'); div.innerHTML = ` -

πŸ₯³ JGA Prag Tourenplan

-
🏨 Hotel Uno (Basis)
-
πŸ” Escape Room
-
🏎️ KartPlanet
-
β›³ Minigolf
-
🎳 Bowling
-
πŸ‘» Geister-Tour
-
🎯 Schießstand
-
β›΅ Beer Boat
-
🎨 Paintball
-
πŸ”« Lasertag
-
πŸ” Enigma
-
-
Filter
- - - - +

πŸ“ Legendeβ–Ό

+
+
🏨 Hotel Uno
+
πŸ” Escape Room
+
🏎️ KartPlanet
+
β›³ Minigolf
+
🎳 Bowling
+
πŸ‘» Geister-Tour
+
🎯 Schießstand
+
β›΅ Beer Boat
+
🎨 Paintball
+
πŸ”« Lasertag
+
πŸ” Enigma
+
+
Filter
+ + + + +
+
πŸ“ Karten-Zentrum: Hotel
-
πŸ“ Karten-Zentrum: Hotel
`; + L.DomEvent.disableClickPropagation(div); + L.DomEvent.disableScrollPropagation(div); // Layer-Toggle Handler setTimeout(() => { div.querySelectorAll('input[data-layer]').forEach(cb => {