mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Change image zoom animation to take safe area into consideration when determining image origin. Issue #1425
This commit is contained in:
@@ -520,9 +520,9 @@ private extension ArticleViewController {
|
||||
|
||||
let base64Image = String(clickMessage.imageURL.suffix(from: range.upperBound))
|
||||
if let imageData = Data(base64Encoded: base64Image), let image = UIImage(data: imageData) {
|
||||
let rect = CGRect(x: CGFloat(clickMessage.x), y: CGFloat(clickMessage.y), width: CGFloat(clickMessage.width), height: CGFloat(clickMessage.height))
|
||||
let y = CGFloat(clickMessage.y) + webView.safeAreaInsets.top
|
||||
let rect = CGRect(x: CGFloat(clickMessage.x), y: y, width: CGFloat(clickMessage.width), height: CGFloat(clickMessage.height))
|
||||
transition.originFrame = webView.convert(rect, to: nil)
|
||||
transition.maskFrame = webView.convert(webView.frame, to: nil)
|
||||
transition.originImage = image
|
||||
|
||||
coordinator.showFullScreenImage(image: image, transitioningDelegate: self)
|
||||
|
||||
Reference in New Issue
Block a user