antvis/G6

The issue has been closed
[Bug]: getZoom is undefined #6589
rmd1710714107 posted onGitHub
Describe the bug / 问题描述
初始化图实例后立即调用getZoom
函数报错:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getZoom')
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
let graph = new Graph({
...
});
console.log(graph.getZoom());
G6 Version / G6 版本
🆕 5.x
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他