Reduce map fly animation to 200ms

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-04-11 00:48:41 +02:00
parent b010cd8c59
commit 7e89de0f0e
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -40,10 +40,10 @@ function FlyToSegment({ segments, highlightedDay, fullData }: {
const latlngs = seg.coords.map((c) => L.latLng(c[1]!, c[0]!));
const bounds = L.latLngBounds(latlngs);
if (bounds.isValid()) {
map.flyToBounds(bounds, { padding: [40, 40], duration: 0.5 });
map.flyToBounds(bounds, { padding: [40, 40], duration: 0.2 });
}
} else if (fullBoundsRef.current?.isValid()) {
map.flyToBounds(fullBoundsRef.current, { padding: [20, 20], duration: 0.5 });
map.flyToBounds(fullBoundsRef.current, { padding: [20, 20], duration: 0.2 });
}
}, [highlightedDay, segments, fullData, map]);