feat: enhance flight tracker with GitHub stars display and improve reset view functionality; update trail history sampling rate

This commit is contained in:
Kewonit
2026-02-14 20:40:21 +05:30
parent 2c60861407
commit 1794a4b678
4 changed files with 92 additions and 12 deletions

View File

@ -44,9 +44,11 @@ export function CameraController({ city }: { city: City }) {
});
};
const onResetView = () => {
const onResetView = (event: Event) => {
const customEvent = event as CustomEvent<{ center?: [number, number] }>;
const center = customEvent.detail?.center ?? city.coordinates;
map.flyTo({
center: city.coordinates,
center,
zoom: DEFAULT_ZOOM,
pitch: DEFAULT_PITCH,
bearing: DEFAULT_BEARING,