Stabilize programmatic map fitting
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-19 02:40:59 +02:00
parent 0bf6068817
commit e5c56272d7
2 changed files with 3 additions and 3 deletions
@@ -47,7 +47,7 @@ def test_map_rectangle_drag_is_wired_to_automatic_analysis() -> None:
assert "new ResizeObserver" in geomap
assert "resizeObserver.observe(containerRef.current)" in geomap
assert "fitDataOnChangeRef.current" in geomap
assert "map.fitBounds(bounds, { padding: 40, duration: 0 })" in geomap
assert geomap.count("map.fitBounds(bounds, { padding: 40, duration: 0 })") == 3
assert "const activeCollection = areaData ?? (fitDataOnChange ? data : null)" in geomap
assert "data && fitDataOnChange && !areaData" in geomap
assert "resizeObserver.disconnect()" in geomap
+2 -2
View File
@@ -426,7 +426,7 @@ function GeoMap({
if (collection.type === 'FeatureCollection' && collection.features.length > 0) {
const bounds = collectCoordinates(collection)
if (bounds) {
map.fitBounds(bounds, { padding: 40 })
map.fitBounds(bounds, { padding: 40, duration: 0 })
}
}
}
@@ -497,7 +497,7 @@ function GeoMap({
if (activeCollection) {
const bounds = collectCoordinates(activeCollection)
if (bounds) {
map.fitBounds(bounds, { padding: 40 })
map.fitBounds(bounds, { padding: 40, duration: 0 })
}
}
}, [areaData, data, fitDataOnChange, mapStyleReady])