flutter_crop icon indicating copy to clipboard operation
flutter_crop copied to clipboard

Bugfix Precropping issue

Open margorski opened this issue 4 years ago • 9 comments

_reCenterImage function now takes into account child widget aspect ratio when calculating boundaries for offset clamping.

margorski avatar Nov 16 '21 12:11 margorski

Thank you for the great job.

I am facing one small issue where the cropped image is not pulled back into the view correctly. See the attachment please.

Screenshot 2021-11-16 234124

xclud avatar Nov 16 '21 20:11 xclud

Yes. That is intended. I described that in github issue. For our purpose, the current behaviour is intended so that is how it works now. If you would like to have it work like before with limiting the pan to the inside of the picture then the calculation needs to be more complex.

margorski avatar Nov 17 '21 06:11 margorski

It's good to have an option of disabling this behavior. But i think it's best to have it enabled by default. What do you think?

xclud avatar Nov 17 '21 17:11 xclud

Animations also come handy to have as another option.

xclud avatar Nov 17 '21 17:11 xclud

Yeah, both animation and that behaviour could be parametrized. However calculating clamp of pan movement in a previous way may be a little more tricky. Still, I think I may find some time trying to implement that next week.

margorski avatar Nov 18 '21 12:11 margorski

I appreciate your efforts.

xclud avatar Nov 18 '21 14:11 xclud

Sorry @xclud but I cannot find the time right now to finish that changes as proposed. Maybe I will have more time to finish that in the new year, but right now changes won't happen. So if you have time to finish that goes on, if not then let's wait.

margorski avatar Dec 07 '21 10:12 margorski

If we disable rotation like this PR https://github.com/xclud/flutter_crop/pull/66 and combine it with this Bugfix Precropping PR, then everything works perfectly. These PRs will fix the issue and that is the general UX user need (like Instagram at change avatar feature, you can try it)

duytq94 avatar Mar 07 '22 15:03 duytq94

This problem has been solved, I use zoom, rotation, and the crop, in my system, but the crop if you slide it to the position you want to crop it comes back by itself, is it some configuration or is it really with the gub, and congratulations by packge!

eduardohr-muniz avatar Jan 25 '23 01:01 eduardohr-muniz