Skip to content

Commit

Permalink
Ignore case where details.scale == 0 (#1388)
Browse files Browse the repository at this point in the history
  • Loading branch information
urusai88 authored Nov 19, 2022
1 parent d3483b0 commit 77cf06d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/gestures/gestures.dart
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ abstract class MapGestureMixin extends State<FlutterMap>
var mapRotated = false;
if (hasMove || hasZoom) {
double newZoom;
if (hasZoom) {
// checking details.scale to prevent situation whew details comes
// with zero scale
if (hasZoom && details.scale > 0.0) {
newZoom = _getZoomForScale(
_mapZoomStart, details.scale + _scaleCorrector);

Expand Down

0 comments on commit 77cf06d

Please sign in to comment.