From a96f772d7ac0bab57248559b872cf0696cf06720 Mon Sep 17 00:00:00 2001 From: Colin Maudry Date: Fri, 3 Jul 2026 16:43:04 +0200 Subject: [PATCH] =?UTF-8?q?fix(figures):=20d=C3=A9sactiver=20l'animation?= =?UTF-8?q?=20du=20fitBounds=20sur=20les=20cartes=20organisme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Un fitBounds animé interrompu (deux Input sur pathname+année pouvant re-déclencher le callback quasi simultanément) laissait le transform CSS de zoom de Leaflet figé à une grande échelle (ex: scale(16)), faisant apparaître les marqueurs individuels démesurément gros sur /acheteurs et /titulaires. Constaté en vérification manuelle sur test.colibre.fr. --- src/figures.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/figures.py b/src/figures.py index c481467..dc46ac7 100644 --- a/src/figures.py +++ b/src/figures.py @@ -613,7 +613,11 @@ def get_org_location_map( lats = [lat for lat, _ in all_points] lons = [lon for _, lon in all_points] map_kwargs["bounds"] = [[min(lats), min(lons)], [max(lats), max(lons)]] - map_kwargs["boundsOptions"] = {"padding": [30, 30], "maxZoom": 12} + map_kwargs["boundsOptions"] = { + "padding": [30, 30], + "maxZoom": 12, + "animate": False, + } else: map_kwargs["center"] = [46.6, 2.2] map_kwargs["zoom"] = 5