antvis/G6

The issue has been closed
graph.get('group').getCanvasBBox() 获取的width特别大 198000 #5353
ForeverWorld posted onGitHub
问题描述
在afteranimat动画完成后获取graph.get('group').getCanvasBBox()获取的width特别大
重现链接
重现链接
重现步骤
容器的宽高在1366*768,调用graph.render()后,在afteranimat动画完成后获取graph.get('group').getCanvasBBox()获取的width特别大,有时候能达到19800,导致渲染的节点在canvas上看不到,调用changeSize重新设置后就能显示
预期行为
想问下什么配置可能导致这个问题,有没有其他好的解决方案,避免使用changeSize
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [4.5.1 ... ]
屏幕截图或视频(可选)
<img width="818" alt="image" src="https://github.com/antvis/G6/assets/100790155/66c414fb-da6c-40b9-b649-a878cf4ae1bf">
No response
补充说明(可选)
No response