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 7b7a134 commit 2932bbe
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Sources/BrightroomUI/Shared/Components/Crop/CropView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1283,24 +1283,15 @@ 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("###", rect, guideSize, minXScale, minYScale, minimumZoomScale, maximumZoomScale, layer.position, layer.frame)
// if targetScale <= maximumZoomScale, targetScale >= minimumZoomScale {
setZoomScale(targetScale, animated: false)
// }
setZoomScale(targetScale, animated: false)

var targetContentOffset =
rect
Expand Down

0 comments on commit 2932bbe

Please sign in to comment.