Skip to content

Commit

Permalink
fix: calculate squaredZoomScale when media asset is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
chenium committed Feb 2, 2022
1 parent 4dbae7a commit 836e7a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Pages/Gallery/YPAssetZoomableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ final class YPAssetZoomableView: UIScrollView {
strongSelf.videoView.setPreviewImage(preview)

strongSelf.setAssetFrame(for: strongSelf.videoView, with: preview)

strongSelf.squaredZoomScale = strongSelf.calculateSquaredZoomScale()

completion()

Expand Down Expand Up @@ -131,6 +133,8 @@ final class YPAssetZoomableView: UIScrollView {
// add update CropInfo after multiple
updateCropInfo()
}

strongSelf.squaredZoomScale = strongSelf.calculateSquaredZoomScale()

completion(isLowResIntermediaryImage)
}
Expand Down

0 comments on commit 836e7a5

Please sign in to comment.