Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
24
iphone/Maps/UI/AvailableArea/VisibleArea.swift
Normal file
24
iphone/Maps/UI/AvailableArea/VisibleArea.swift
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
final class VisibleArea: AvailableArea {
|
||||
override func isAreaAffectingView(_ other: UIView) -> Bool {
|
||||
return !other.visibleAreaAffectDirections.isEmpty
|
||||
}
|
||||
|
||||
override func addAffectingView(_ other: UIView) {
|
||||
let ov = other.visibleAreaAffectView
|
||||
let directions = ov.visibleAreaAffectDirections
|
||||
addConstraints(otherView: ov, directions: directions)
|
||||
}
|
||||
|
||||
override func notifyObserver() {
|
||||
if CarPlayService.shared.isCarplayActivated {
|
||||
return
|
||||
}
|
||||
FrameworkHelper.setVisibleViewport(areaFrame, scaleFactor: MapViewController.shared()?.mapView.contentScaleFactor ?? 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
extension UIView {
|
||||
@objc var visibleAreaAffectDirections: MWMAvailableAreaAffectDirections { return [] }
|
||||
|
||||
var visibleAreaAffectView: UIView { return self }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue