mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Story location improvements
This commit is contained in:
parent
dcfc4d9364
commit
2254886ae3
@ -180,10 +180,10 @@ public final class LocationMapHeaderNode: ASDisplayNode {
|
||||
public func updateLayout(layout: ContainerViewLayout, navigationBarHeight: CGFloat, topPadding: CGFloat, offset: CGFloat, size: CGSize, transition: ContainedViewLayoutTransition) {
|
||||
self.validLayout = (layout, navigationBarHeight, topPadding, offset, size)
|
||||
|
||||
let mapHeight: CGFloat = floor(layout.size.height * 1.3)
|
||||
let mapFrame = CGRect(x: 0.0, y: floorToScreenPixels((size.height - mapHeight + navigationBarHeight) / 2.0) + offset, width: size.width, height: mapHeight)
|
||||
let mapHeight: CGFloat = floor(layout.size.height * 1.3) + layout.intrinsicInsets.top * 2.0
|
||||
let mapFrame = CGRect(x: 0.0, y: floorToScreenPixels((size.height - mapHeight + navigationBarHeight) / 2.0) + offset + floor(layout.intrinsicInsets.top * 0.5), width: size.width, height: mapHeight)
|
||||
transition.updateFrame(node: self.mapNode, frame: mapFrame)
|
||||
self.mapNode.updateLayout(size: mapFrame.size, topPadding: layout.intrinsicInsets.top)
|
||||
self.mapNode.updateLayout(size: mapFrame.size, topPadding: 0.0)
|
||||
|
||||
let inset: CGFloat = 6.0
|
||||
|
||||
|
@ -3051,7 +3051,7 @@ public final class PeerInfoStoryPaneNode: ASDisplayNode, PeerInfoPaneNode, ASScr
|
||||
return
|
||||
}
|
||||
|
||||
let mapOverscrollInset: CGFloat = 200.0
|
||||
let mapOverscrollInset: CGFloat = 300.0
|
||||
|
||||
var mapHeight = min(size.width, size.height)
|
||||
mapHeight = min(mapHeight, floor(size.height * 0.389))
|
||||
|
Loading…
x
Reference in New Issue
Block a user