forked from organicmaps/organicmaps-tmp
[iOS] fix wrong map viewport
This commit is contained in:
parent
476b5f05b4
commit
fa6dcb2f4b
2 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@ final class VisibleArea: AvailableArea {
|
|||
return
|
||||
}
|
||||
}
|
||||
FrameworkHelper.setVisibleViewport(areaFrame, scaleFactor: contentScaleFactor)
|
||||
FrameworkHelper.setVisibleViewport(areaFrame, scaleFactor: MapViewController.shared()?.mapView.contentScaleFactor ?? 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ final class CarPlayMapViewController: MWMViewController {
|
|||
frame.origin = origin
|
||||
frame.size = CGSize(width: viewBounds.width - origin.x,
|
||||
height: viewBounds.height - origin.y)
|
||||
FrameworkHelper.setVisibleViewport(frame, scaleFactor: view.contentScaleFactor)
|
||||
FrameworkHelper.setVisibleViewport(frame, scaleFactor: mapView?.contentScaleFactor ?? 1)
|
||||
}
|
||||
|
||||
private func updateVisibleViewPortToNavigationState() {
|
||||
|
@ -136,11 +136,11 @@ final class CarPlayMapViewController: MWMViewController {
|
|||
frame.origin = origin
|
||||
frame.size = CGSize(width: viewBounds.width - (origin.x + mapControlsWidth),
|
||||
height: viewBounds.height - origin.y)
|
||||
FrameworkHelper.setVisibleViewport(frame, scaleFactor: view.contentScaleFactor)
|
||||
FrameworkHelper.setVisibleViewport(frame, scaleFactor: mapView?.contentScaleFactor ?? 1)
|
||||
}
|
||||
|
||||
private func updateVisibleViewPortToDefaultState() {
|
||||
FrameworkHelper.setVisibleViewport(view.bounds, scaleFactor: view.contentScaleFactor)
|
||||
FrameworkHelper.setVisibleViewport(view.bounds, scaleFactor: mapView?.contentScaleFactor ?? 1)
|
||||
}
|
||||
|
||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
|
|
Loading…
Add table
Reference in a new issue