removeNodeData bug #5789
RackweLLizm posted onGitHub
问题描述
in Graphin graph.updateItem(id,{...}) graph.removeItem(id);
I could easily perform update and remove operations using it. But now I have to specify the type and this seems to make things a little complicated. When I give the ID for Delete and Update operations, it would be nice to have a method that would find the type from the ID in the graph and perform the operation. This is a suggestion.
I perform the deletion using the method below and the deletion is successful and there is no problem.
RemoveItem = (id: string) => {
let elementType = this.graphInstance.getElementType(id)
if (elementType === "node") {
this.graphInstance.removeNodeData([id])
this.graphInstance.render();
}
else if (elementType === "edge") {
this.graphInstance.removeEdgeData([id])
}
else if (elementType === "combo") {
this.graphInstance.removeComboData([id])
}
}
But no matter what operation I do in the graph, I get the error shown in the picture below. Clicking on the node, clicking on the canvas, etc. All operations result in the following error.
重现链接
notFound
重现步骤
bug
预期行为
notFound
平台
- 操作系统: [Windows,]
- 网页浏览器: [Google Chrome,]
- G6 版本: "@antv/g6": "^5.0.0-beta.37",
屏幕截图或视频(可选)
No response
补充说明(可选)
No response