-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
使用rotate旋转后,zoom-canvas失效,图谱不能放大或缩小 #2277
Comments
谢谢,是个 bug,接下来会跟进一下 |
大概什么时间会修复呢,我们这边项目需求要做调整 |
大佬,这个还没有修复吗 |
经排查,是由于旋转后矩阵的取值方式应该与旋转前不同,但目前由于没有考虑到用户会旋转画布,所以取缩放系数都是取的 matrix[0]. 目前可以这样进行旋转和缩放: 引用两个矩阵相关的 util 包
旋转:
缩放:
由于旋转画布这个操作比较少见,可能短期内还没有安排在内部解决旋转画布后的缩放问题 |
请另开 issue 并提供一下在线复现 demo 哈 |
由于旋转画布这个操作比较少见,没有计划支持该需求 |
自己使用graph.getGroup().setMatrix设置旋转矩阵之后,与矩阵相关的API全乱套了,focus、zoomTo等等。而且缩放操作时缩放中心并不是设置的center的位置。后续会支持内置的旋转画布操作吗? |
同旋转后zoom行为失效问题,可以旋转根 group 中的子group
|
Reproduction link
Steps to reproduce
项目中之前用的是3.6.0的版本,升级到最新的3.8.3,这个问题依然存在
在官方示例上,最下面添加了两行代码
graph.get('group').rotate(Math.PI / 2)
graph.moveTo(0,0)
实现rotate后,图谱不能放大或缩小了
The text was updated successfully, but these errors were encountered: