Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
shima11 committed Apr 23, 2024
1 parent 7d716dd commit 7b7a134
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sources/BrightroomUI/Shared/Components/Crop/CropView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1283,15 +1283,21 @@ extension UIScrollView {
animated: Bool
) {

guard rect.isEmpty == false else {
return
}

func run() {

let targetContentSize = rect.size
let boundSize = guideSize

// targetContentSize.widthが0っぽい

let minXScale = boundSize.width / targetContentSize.width
let minYScale = boundSize.height / targetContentSize.height
let targetScale = min(minXScale, minYScale)
print("###", minXScale, minYScale, minimumZoomScale, maximumZoomScale, layer.position, layer.frame)
print("###", rect, guideSize, minXScale, minYScale, minimumZoomScale, maximumZoomScale, layer.position, layer.frame)
// if targetScale <= maximumZoomScale, targetScale >= minimumZoomScale {
setZoomScale(targetScale, animated: false)
// }
Expand Down

0 comments on commit 7b7a134

Please sign in to comment.