Closed plisiam closed 3 years ago
@plisiam Thanks for the report and suggestions! I fixed it in a branch. Would you mind helping to check if it solve the issue by using the commit below? Thank you very much!
pod 'Mantis', :git => 'https://github.com/guoyingtao/Mantis.git', :commit => '92cbf5f408baf9132082499d8caae47c7d887b7a'
Hi, thanks for the quick fix. 0.25 is probably ok. I can't replicate it anymore.
Unfortunately I found one more bug with a similar symptoms, but probably different root cause. I'll enter it separately.
When an user crops an image, then sometimes the crop action is reverted or modified.
Steps to reproduce - option 1:
https://user-images.githubusercontent.com/82956823/115572512-429df200-a2c0-11eb-8b9d-33954442f8d9.mov
Steps to reproduce - option 2:
https://user-images.githubusercontent.com/82956823/115572616-5cd7d000-a2c0-11eb-8802-dcf745bab201.mov
Notes
ImageContainer.contains
, which return false when is called fromCropView.makeSureImageContainsCropOverlay
in the functionCropView.adjustUIForNewCrop
refBounds.contains(p2)
returns false, because of the precision/tolerance which is used. Check the prints of values from the functioncontains
functions works correctly when called fromupdateCropBoxFrame
Suggested solution 1
ImageContainer.contains
function and it would be changed only when calling fromCropView.adjustUIForNewCrop
Suggested solution 2
makeSureImageContainsCropOverlay
in the functionCropView.adjustUIForNewCrop
every timemakeSureImageContainsCropOverlay
inadjustUIForNewCrop
only whenadjustUIForNewCrop
is called after setting the fixed ratio or after rotating