From 63cf7888d8c7767ae9566d72623d43ca35d50297 Mon Sep 17 00:00:00 2001 From: Juraj Hilje Date: Fri, 16 Aug 2024 16:03:07 +0200 Subject: [PATCH 1/2] fix(ui): update MapScrollView.swift --- IVPNClient/Scenes/MainScreen/Map/MapScrollView.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IVPNClient/Scenes/MainScreen/Map/MapScrollView.swift b/IVPNClient/Scenes/MainScreen/Map/MapScrollView.swift index 24c190c54..aa1251647 100644 --- a/IVPNClient/Scenes/MainScreen/Map/MapScrollView.swift +++ b/IVPNClient/Scenes/MainScreen/Map/MapScrollView.swift @@ -118,6 +118,9 @@ class MapScrollView: UIScrollView { func updateMapMarkers() { markerLocalView.updateView() markerGatewayView.updateView() + if let viewModel = viewModel { + updateMapPosition(viewModel: viewModel, animated: true) + } } func updateMapPosition(latitude: Double, longitude: Double, animated: Bool = false, isLocalPosition: Bool, updateMarkers: Bool = true) { From 885fd1be9ade88e85a66721a77d1a7e9e0896761 Mon Sep 17 00:00:00 2001 From: Juraj Hilje Date: Thu, 22 Aug 2024 17:22:57 +0200 Subject: [PATCH 2/2] fix(ui): update MapScrollView.swift --- IVPNClient/Scenes/MainScreen/Map/MapScrollView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IVPNClient/Scenes/MainScreen/Map/MapScrollView.swift b/IVPNClient/Scenes/MainScreen/Map/MapScrollView.swift index aa1251647..c16a8cb0a 100644 --- a/IVPNClient/Scenes/MainScreen/Map/MapScrollView.swift +++ b/IVPNClient/Scenes/MainScreen/Map/MapScrollView.swift @@ -139,7 +139,7 @@ class MapScrollView: UIScrollView { } if updateMarkers { - updateMarkerPosition(x: point.0 - 49, y: point.1 - 49, isLocalPosition: isLocalPosition) + updateMarkerPosition(x: point.0, y: point.1, isLocalPosition: isLocalPosition) } currentCoordinates = (latitude, longitude) @@ -252,7 +252,7 @@ class MapScrollView: UIScrollView { private func updateMarkerPosition(x: Double, y: Double, isLocalPosition: Bool) { if isLocalPosition { - markerLocalView.snp.updateConstraints { make in + markerLocalView.snp.remakeConstraints { make in make.left.equalTo(x) make.top.equalTo(y) } @@ -261,7 +261,7 @@ class MapScrollView: UIScrollView { self.layoutIfNeeded() } } else { - markerGatewayView.snp.updateConstraints { make in + markerGatewayView.snp.remakeConstraints { make in make.left.equalTo(x) make.top.equalTo(y) }