Skip to content

Commit

Permalink
Merge pull request #724 from chenium/bug/squared-crop-button-requires…
Browse files Browse the repository at this point in the history
…-double-tap

fix: calculate squaredZoomScale when media asset is loaded
  • Loading branch information
NikKovIos authored Apr 26, 2022
2 parents d17d8f4 + 836e7a5 commit c6d56eb
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 c6d56eb

Please sign in to comment.