From 373560e9b2f728c084182be064f0f3acb263d534 Mon Sep 17 00:00:00 2001 From: Peter Date: Sat, 24 Aug 2024 16:43:49 +0200 Subject: [PATCH] do not zoom out on current loc button --- src/map/LocationButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/LocationButton.tsx b/src/map/LocationButton.tsx index 05a7ba3a..53d6a745 100644 --- a/src/map/LocationButton.tsx +++ b/src/map/LocationButton.tsx @@ -1,7 +1,7 @@ import styles from './LocationButton.module.css' import { onCurrentLocationButtonClicked } from '@/map/MapComponent' import Dispatcher from '@/stores/Dispatcher' -import { SetBBox, SetPoint } from '@/actions/Actions' +import {SetBBox, SetPoint, ZoomMapToPoint} from '@/actions/Actions' import { getBBoxFromCoord, QueryPoint, QueryPointType } from '@/stores/QueryStore' import LocationError from '@/map/location_error.svg' import LocationSearching from '@/map/location_searching.svg' @@ -31,7 +31,7 @@ export default function LocationButton(props: { queryPoints: QueryPoint[] }) { false ) ) - Dispatcher.dispatch(new SetBBox(getBBoxFromCoord(coordinate))) + Dispatcher.dispatch(new ZoomMapToPoint(coordinate)) // We do not reset state of this button when map is moved, so we do not know if // the map is currently showing the location. setLocationSearch('synched_map_or_initial')