Skip to content

Commit 8f3689c

Browse files
committed
feat: added change reason to view port update
1 parent f491b6b commit 8f3689c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/MapLibreSwiftUI/MapViewCoordinator.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ extension MapViewCoordinator: MLNMapViewDelegate {
276276
// MARK: MapViewPort
277277

278278
@MainActor private func updateViewPort(mapView: MLNMapView, reason: MLNCameraChangeReason) {
279-
280279
// Calculate the Raw "ViewPort"
281280
let calculatedViewPort = MapViewPort(
282281
center: mapView.centerCoordinate,

Sources/MapLibreSwiftUI/Models/MapViewPort.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ public struct MapViewPort: Hashable, Equatable {
1515

1616
/// The current compass direction of the MapView
1717
public let direction: CLLocationDirection
18-
18+
1919
/// The reason the view port was changed.
2020
public let lastReasonForChange: CameraChangeReason?
2121

2222
public init(center: CLLocationCoordinate2D,
2323
zoom: Double,
2424
direction: CLLocationDirection,
25-
lastReasonForChange: CameraChangeReason?) {
25+
lastReasonForChange: CameraChangeReason?)
26+
{
2627
self.center = center
2728
self.zoom = zoom
2829
self.direction = direction

0 commit comments

Comments
 (0)