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.showAuxiliary = checkShowAux.checked;
|
||||||
state.turbines.forEach(t => {
|
state.turbines.forEach(t => {
|
||||||
Object.entries(t.layers).forEach(([name, layer]) => {
|
Object.entries(t.layers).forEach(([name, layer]) => {
|
||||||
if (name !== 'marker' && name !== 'rotationHandle') {
|
if (name !== 'marker' && name !== 'rotationHandle' && name !== 'sweptArea') {
|
||||||
if (state.showAuxiliary) {
|
if (state.showAuxiliary) {
|
||||||
variantLayers[t.variant].addLayer(layer);
|
variantLayers[t.variant].addLayer(layer);
|
||||||
} else {
|
} else {
|
||||||
variantLayers[t.variant].removeLayer(layer);
|
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
|
// Eigentümerzustimmung Toggle
|
||||||
const checkShowOwners = document.getElementById('checkShowOwners');
|
const checkShowOwners = document.getElementById('checkShowOwners');
|
||||||
if (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);">
|
<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
|
<input type="checkbox" id="checkShowAux" checked> Hilfsgeometrien
|
||||||
</label>
|
</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);">
|
<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
|
<input type="checkbox" id="checkShowOwners" checked> Eigentümerzustimmung
|
||||||
</label>
|
</label>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue