Fix proximity lines update on drag and toggle
Deploy Standortplaner / deploy (push) Successful in 17s
Details
Deploy Standortplaner / deploy (push) Successful in 17s
Details
This commit is contained in:
parent
f4092ed95d
commit
e823b10e93
9
app.js
9
app.js
|
|
@ -534,8 +534,8 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
if (!isDragUpdating) {
|
||||
isDragUpdating = true;
|
||||
requestAnimationFrame(() => {
|
||||
try {
|
||||
if (!latestDragPos) {
|
||||
isDragUpdating = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -561,8 +561,9 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
editNr.value = turbine.nr;
|
||||
updateEditPanelPosition(); // Sync floating panel
|
||||
}
|
||||
|
||||
} finally {
|
||||
isDragUpdating = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -779,6 +780,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
state.map.removeLayer(proxLayer);
|
||||
}
|
||||
}
|
||||
updateProximityLines();
|
||||
updateLegend();
|
||||
};
|
||||
}
|
||||
|
|
@ -982,6 +984,9 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
function updateProximityLines() {
|
||||
proximityLinesLayer.clearLayers();
|
||||
|
||||
const checkShowProximity = document.getElementById('checkShowProximity');
|
||||
if (checkShowProximity && !checkShowProximity.checked) return;
|
||||
|
||||
// Only show lines if the current variant layer is visible
|
||||
if (!state.map.hasLayer(variantLayers[state.activeVariant])) return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue