-
-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug report] Crop Area Changed Unexpectedly #713
Comments
Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2024-11-25.at.10.55.42.mp4Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2024-11-25.at.10.56.01.mp4 |
This is auto center function, you can check android / ios album |
This issue is not related to picture zooming or recentering but rather to the unexpected behavior of the selection area. For instance, when I drag the selection box upward, the selection area unexpectedly shrinks to the right. Additionally, this functionality is not present on either iOS or Android. |
拖动到边界的时候继续拖拽,会试图缩放图片来满足条件的,这也是系统相册的效果 |
我似乎记得好像以前系统相册是有过类似的功能,但是目前我检查了最新的系统相册,这些功能已经被弃用了,我个人觉得是因为会导致错误操作和误导。我尝试修复了问题,你可以在example中测试一下效果,是否用户体验会更好~ 我的pull request中,还修复了一些已知问题和加入了一些新功能:
简而言之,更新后的crop基础功能和基础动画与ios相册最新crop设计的几乎一样~ 希望你喜欢这些更新,如果可以的话,请merge到官方版本中,这样,我也就不用维护个人版本啦~哈哈~ 请注意,我并没有做代码清理和优化,为了方便你快速阅读,我尽可能使用已有的方法和代码来实现新功能和修复bug~ |
Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2024-11-27.at.17.15.21.mp4Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2024-11-27.at.17.19.36.mp4 |
首先,很感谢你使用该组件,也感谢你的 pr。
scaleToFit 有多个地方使用到了,小心修改。
修改为动画,需要注意历史状态的保存问题。
正确的情况是因为根据 新旧 widget 的参数,对当前状态进行修改。当前直接重置,只是因为情况太多了,没法一一进行处理。 updateCropRect 方法,你要考虑图片已经发生了旋转的情况,不是简单跟 imageRect 比较就可以了的 |
除了 |
强制重置设置 , 这个问题,我空了再看下。 |
感谢你的tips,确实很快发现并解决了两个bug~ |
Version
^9.0.6
Platforms
Android, iOS
Device Model
emulator, iPhone 15 Pro Plus
flutter info
How to reproduce?
Logs
No response
Example code (optional)
Contact
No response
The text was updated successfully, but these errors were encountered: