Skip to content

Commit d8e52ac

Browse files
authored
Center zoom on pinch zoom gesture (not just on move gesture) (#1543)
1 parent 64e3a8e commit d8e52ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/gestures/gestures.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ abstract class MapGestureMixin extends State<FlutterMap>
435435
}
436436
}
437437

438-
if (_pinchMoveStarted) {
438+
if (_pinchZoomStarted || _pinchMoveStarted) {
439439
final oldCenterPt = mapState.project(mapState.center, newZoom);
440440
final newFocalLatLong = _offsetToCrs(_focalStartLocal, newZoom);
441441
final newFocalPt = mapState.project(newFocalLatLong, newZoom);

0 commit comments

Comments
 (0)