feat: Keep sweptArea visible when toggling aux geometries, add toggle for Abstandslinien
Deploy Standortplaner / deploy (push) Successful in 17s
Details
Deploy Standortplaner / deploy (push) Successful in 17s
Details
This commit is contained in:
parent
ae780f5586
commit
12d6a77fe3
27
app.js
27
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) {
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@
|
|||
<label style="cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-dim);">
|
||||
<input type="checkbox" id="checkShowAux" checked> Hilfsgeometrien
|
||||
</label>
|
||||
<label style="cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-dim);">
|
||||
<input type="checkbox" id="checkShowProximity" checked> Abstandslinien
|
||||
</label>
|
||||
<label style="cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-dim);">
|
||||
<input type="checkbox" id="checkShowOwners" checked> Eigentümerzustimmung
|
||||
</label>
|
||||
|
|
|
|||
Loading…
Reference in New Issue