Skip to content

Commit

Permalink
fix: solve reset UI issue
Browse files Browse the repository at this point in the history
restore code in CropViewModel.reset
  • Loading branch information
guoyingtao committed Nov 2, 2022
1 parent 19bc270 commit b531628
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Mantis/CropView/CropView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -777,9 +777,9 @@ extension CropView {
}

viewModel.reset(forceFixedRatio: forceFixedRatio)

resetUIFrame()
viewModel.setInitialStatus()


delegate?.cropViewDidBecomeUnResettable(self)
delegate?.cropViewDidEndResize(self)
}
Expand Down
2 changes: 2 additions & 0 deletions Sources/Mantis/CropView/CropViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ class CropViewModel: NSObject {

cropLeftTopOnImage = .zero
cropRightBottomOnImage = CGPoint(x: 1, y: 1)

setInitialStatus()
}

func rotateBy90(rotateAngle: CGFloat) {
Expand Down

0 comments on commit b531628

Please sign in to comment.