From bc8b42d49e73de861469f96cfa8274bd01701793 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 17 May 2023 13:10:22 +0200 Subject: [PATCH] Tweak: change zoom behaviour when jumping to the current location --- Logic/Actors/GeoLocationHandler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Logic/Actors/GeoLocationHandler.ts b/Logic/Actors/GeoLocationHandler.ts index 3daace172..b290ecf64 100644 --- a/Logic/Actors/GeoLocationHandler.ts +++ b/Logic/Actors/GeoLocationHandler.ts @@ -138,7 +138,8 @@ export default class GeoLocationHandler { lat: newLocation.latitude, }) 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.geolocationState.requestMoment.setData(undefined) }