Tweak: change zoom behaviour when jumping to the current location

This commit is contained in:
Pieter Vander Vennet 2023-05-17 13:10:22 +02:00
parent d8a87abbf6
commit bc8b42d49e

View file

@ -138,7 +138,8 @@ export default class GeoLocationHandler {
lat: newLocation.latitude, lat: newLocation.latitude,
}) })
const zoom = this.mapProperties.zoom const zoom = this.mapProperties.zoom
zoom.setData(Math.max(zoom.data, 16)) zoom.setData(Math.min(Math.max(zoom.data, 14), 18))
this.mapHasMoved.setData(new Date()) this.mapHasMoved.setData(new Date())
this.geolocationState.requestMoment.setData(undefined) this.geolocationState.requestMoment.setData(undefined)
} }