-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
使用 SVG 自定义图标时,节点不能正常缩放 #2033
Comments
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
根据我的经验,只有使用相对参数才能自动缩放。也就是说,需要使用refX,refY,refWidth,refHeight,refD等才能做到你希望的自动缩放。 |
@wtjperi2003 请问这个问题你解决了吗,可以分享一下吗 |
@georgezhu08 说的很对,如果图形支持缩放,需要使用 refXXX 属性。 |
要看图标的类型,如果是单笔的图标,就能正常缩放 |
path类型的有方法设置成自动缩放吗? |
我也遇到了这个问题,请问你解决了吗? |
最终是使用html类型节点,里面钳svg图标,图标高宽设成100%。这样就能适应所有了 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
问题描述
使用官方示例:https://x6.antv.vision/zh/examples/node/custom-node#custom-icon-with-svg ,定义出来的svg图标,在画布开启resizing,也就是允许节点缩放的配置后。该图标节点不能缩放
重现链接
https://x6.antv.vision/zh/examples/node/custom-node#custom-icon-with-svg
重现步骤
1.https://x6.antv.vision/zh/examples/node/custom-node#custom-icon-with-svg
2.代码里,graph配置项添加resizing:true
3.自动刷新后,左侧图标选中,鼠标点右下角进行缩放操作
预期行为
能看到图标随着选框进行缩放
平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: