Reduce map fly animation to 200ms
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b010cd8c59
commit
7e89de0f0e
1 changed files with 2 additions and 2 deletions
|
|
@ -40,10 +40,10 @@ function FlyToSegment({ segments, highlightedDay, fullData }: {
|
||||||
const latlngs = seg.coords.map((c) => L.latLng(c[1]!, c[0]!));
|
const latlngs = seg.coords.map((c) => L.latLng(c[1]!, c[0]!));
|
||||||
const bounds = L.latLngBounds(latlngs);
|
const bounds = L.latLngBounds(latlngs);
|
||||||
if (bounds.isValid()) {
|
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()) {
|
} 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]);
|
}, [highlightedDay, segments, fullData, map]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue