antvis/G6



The issue has been closed
图使用插件Minimap并设置type="delegate"时调用Graph的clear方法则会报错 #5295
youbins posted onGitHub
G6 Version
4.x
Describe the bug
图使用插件Minimap并设置type="delegate"时调用Graph的clear方法则会报错
Your Example Website or App
https://codesandbox.io/p/sandbox/amazing-mahavira-q4cy93?file=%2Findex.js
Steps to Reproduce the Bug or Issue
1、创建图
const graph = new G6.Graph({
container: "container",
width,
height,
plugins: [
new G6.Minimap({
type: "delegate",
}),
],
});
graph.data(data);
graph.render();
2、执行clear方法
setTimeout(() => {
graph.clear();
graph.read(data);
}, 3000);
Expected behavior
执行clear方法不报错
Screenshots or Videos
No response
Platform
- OS: Windows
- Browser: Edge
- Version: 121.0.2277.4
Additional context
No response