-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
feat(imagePreview): Added image preview ability to rotate images #13205
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13205 +/- ##
==========================================
- Coverage 89.64% 89.50% -0.14%
==========================================
Files 257 257
Lines 7008 7071 +63
Branches 1733 1745 +12
==========================================
+ Hits 6282 6329 +47
- Misses 382 396 +14
- Partials 344 346 +2 ☔ View full report in Codecov by Sentry. |
感谢你的 PR!这个功能的实现可能比表面看起来更复杂,需要注意以下几点:
|
@inottn 您好 按照优化建议调整了下。看是否可行 |
抱歉回复晚了。我查看了许多相关的应用后,觉得我们可以将旋转行为限定为 90 度,不支持其他角度。暂时没有想到用户需要非 90 度旋转的场景,这样的设计也能让代码更简洁。 |
@inottn 有道理 已经调整 |
测试了下,当旋转后双击放大,拖动时的边界似乎有问题。 |
确实是有这个问题,这次修改 maxMoveX 和 maxMoveY 的计算逻辑,考虑旋转后的尺寸和缩放比例,我试了下应该是正常的 |
Before submitting a pull request, please read the contributing guide.
在提交 pull request 之前,请阅读 贡献指南。
#13153
上面issue中提到的ImagePreview组件增加图片的旋转功能