Skip to content

Commit 7594c2a

Browse files
authored
Update lib/src/map/camera/camera.dart with suggestion
1 parent 53e76fd commit 7594c2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/src/map/camera/camera.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,13 @@ class MapCamera {
190190
/// Jumps camera to opposite side of the world to enable seamless scrolling
191191
/// between 180 and -180 longitude.
192192
LatLng _adjustPositionForSeamlessScrolling(LatLng? position) {
193-
if (!crs.replicatesWorldLongitude) return position ?? center;
194-
195-
final safePosition = position ?? center;
196-
197193
const bufferZoneSize = 10;
198194
const worldWrap = 360;
199195
const epsilon = 1e-6;
196+
197+
final safePosition = position ?? center;
198+
if (!crs.replicatesWorldLongitude) return safePosition;
199+
200200
double lon = safePosition.longitude;
201201

202202
// Wrap longitude to [-180, 180] range efficiently

0 commit comments

Comments
 (0)