From d8e52acff81d7895c149b6b219e0d985d099bc86 Mon Sep 17 00:00:00 2001 From: JosefWN Date: Sun, 4 Jun 2023 12:11:41 +0200 Subject: [PATCH] Center zoom on pinch zoom gesture (not just on move gesture) (#1543) --- lib/src/gestures/gestures.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/gestures/gestures.dart b/lib/src/gestures/gestures.dart index 9e51748e4..2033dfd8a 100644 --- a/lib/src/gestures/gestures.dart +++ b/lib/src/gestures/gestures.dart @@ -435,7 +435,7 @@ abstract class MapGestureMixin extends State } } - if (_pinchMoveStarted) { + if (_pinchZoomStarted || _pinchMoveStarted) { final oldCenterPt = mapState.project(mapState.center, newZoom); final newFocalLatLong = _offsetToCrs(_focalStartLocal, newZoom); final newFocalPt = mapState.project(newFocalLatLong, newZoom);