Add JMA Haneda temps and fix stale detail loading

This commit is contained in:
2569718930@qq.com
2026-04-08 16:20:02 +08:00
parent 7b1f34db27
commit 6f80d31852
10 changed files with 347 additions and 13 deletions
+12 -3
View File
@@ -342,9 +342,18 @@ export function useLeafletMap({
}).addTo(map);
marker.on("click", () => {
map.stop();
// Reset lastMovedCity so we can re-fly if needed
lastMovedCityRef.current = null;
const currentMap = mapRef.current;
currentMap?.stop();
if (currentMap && !suspendMotion) {
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);
});