antvis/G6

The issue has been closed
使用svg渲染,fitview视口不会适应画布居中 #5288
multitaskpeople posted onGitHub
G6 Version
4.x
Describe the bug
实例graph时 使用 randerer:'svg', 边配置edge中 配置label为前后有空格的字符串,例: label:' bug复现 ',使用fitview方法时,svg图形最终渲染不能自动适应布局视口
Your Example Website or App
暂无
Steps to Reproduce the Bug or Issue
1.实例化graph,使用 randerer:‘svg’, 2.创建若两个节点和一条边, 变配置 label:‘ bug复现 ’, 3.使用fitview()方法 图形不会自动适应视口
Expected behavior
初步发现 svg整个图再画布中自动适应了,但是<svg>中<g>标签的缩放有问题,去除label属性值的前后空格即可规避bug,希望得到修复
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response