From 12d6a77fe3ba3111dacfb3414e212a6865a37bdb Mon Sep 17 00:00:00 2001 From: Johannes Baumeister Date: Fri, 3 Jul 2026 20:52:13 +0200 Subject: [PATCH] feat: Keep sweptArea visible when toggling aux geometries, add toggle for Abstandslinien --- app.js | 27 +++++++++++++++++++++------ index.html | 3 +++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/app.js b/app.js index 9d97b12..bcef331 100644 --- a/app.js +++ b/app.js @@ -635,18 +635,33 @@ document.addEventListener('DOMContentLoaded', async () => { state.showAuxiliary = checkShowAux.checked; state.turbines.forEach(t => { Object.entries(t.layers).forEach(([name, layer]) => { - if (name !== 'marker' && name !== 'rotationHandle') { - if (state.showAuxiliary) { - variantLayers[t.variant].addLayer(layer); - } else { - variantLayers[t.variant].removeLayer(layer); + if (name !== 'marker' && name !== 'rotationHandle' && name !== 'sweptArea') { + if (state.showAuxiliary) { + variantLayers[t.variant].addLayer(layer); + } else { + variantLayers[t.variant].removeLayer(layer); + } } - } }); }); }; } + // Abstandslinien Toggle + const checkShowProximity = document.getElementById('checkShowProximity'); + if (checkShowProximity) { + checkShowProximity.onchange = () => { + const proxLayer = overlays["Abstände (Gleiches Layout)"]; + if (proxLayer) { + if (checkShowProximity.checked) { + state.map.addLayer(proxLayer); + } else { + state.map.removeLayer(proxLayer); + } + } + }; + } + // Eigentümerzustimmung Toggle const checkShowOwners = document.getElementById('checkShowOwners'); if (checkShowOwners) { diff --git a/index.html b/index.html index 7bc7187..ffd0ff4 100644 --- a/index.html +++ b/index.html @@ -45,6 +45,9 @@ +