feat: add map framing save button and prevent initial load save
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 17s

- Add "Définir le cadrage" button in multi mode to save current map
  center and zoom as default framing
- Add getCurrentZoom() method in MapPreview to retrieve current zoom level
- Fix: prevent automatic save on initial load with isInitialLoad flag
  to avoid marking page as modified when loading existing data
- Style: dark button theme for save framing button

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-02-06 09:20:12 +01:00
parent 8e67431622
commit 5531aebc04
4 changed files with 20738 additions and 606 deletions

View file

@ -309,6 +309,13 @@ export default {
};
}
function getCurrentZoom() {
if (map.value && map.value.loaded()) {
return map.value.getZoom();
}
return props.zoom;
}
function centerOnPosition(lat, lon) {
if (map.value && map.value.loaded()) {
map.value.flyTo({
@ -323,6 +330,7 @@ export default {
mapContainer,
loading,
getCurrentCenter,
getCurrentZoom,
centerOnPosition
};
}