Skip to content

Commit

Permalink
Center zoom on pinch zoom gesture (not just on move gesture) (#1543)
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefWN authored Jun 4, 2023
1 parent 64e3a8e commit d8e52ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/gestures/gestures.dart
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ abstract class MapGestureMixin extends State<FlutterMap>
}
}

if (_pinchMoveStarted) {
if (_pinchZoomStarted || _pinchMoveStarted) {
final oldCenterPt = mapState.project(mapState.center, newZoom);
final newFocalLatLong = _offsetToCrs(_focalStartLocal, newZoom);
final newFocalPt = mapState.project(newFocalLatLong, newZoom);
Expand Down

0 comments on commit d8e52ac

Please sign in to comment.