Skip to content

Commit

Permalink
do not zoom out on current loc button
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Aug 24, 2024
1 parent fcd3723 commit 373560e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map/LocationButton.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 373560e

Please sign in to comment.