移除分布视图地图点击时的 flyTo 放大动画

This commit is contained in:
2569718930@qq.com
2026-05-19 17:09:59 +08:00
parent bddf7f1372
commit 9d6eb54a4f
-14
View File
@@ -674,20 +674,6 @@ export function useLeafletMap({
const signature = getMarkerSignature(city, snapshot);
const previousSignature = lastCityDataRef.current[city.name];
const selectCityFromMarker = () => {
const currentMap = mapRef.current;
currentMap?.stop();
if (currentMap && !suspendMotionRef.current) {
const c = currentMap.getContainer();
if (!c || c.offsetWidth <= 0 || c.offsetHeight <= 0) return;
currentMap.flyTo([city.lat, city.lon], 11, {
animate: true,
duration: 1.05,
easeLinearity: 0.22,
});
lastMovedCityRef.current = city.name;
} else {
lastMovedCityRef.current = null;
}
onSelectCityRef.current(city.name);
};
const bindMarkerTouchSelect = (marker: L.Marker) => {