-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
waiting for authorFurther information is requested from the authorFurther information is requested from the author
Description
问题描述
通过调用removeCells(...) 对应
Line 141 in a243837
| protected removeCells(cells: Cell[], options: CollectionRemoveOptions) { |
重现链接
无
重现步骤
import { Graph } from "@antv/x6";
const graph = new Graph({
container: document.getElementById('app')!,
width: 800,
height: 600,
})
const parent = graph.addNode({
x: 100,
y: 100,
width: 400,
height: 300,
})
const child1 = graph.addNode({
x: 150,
y: 150,
width: 100,
height: 50,
})
parent.addChild(child1)
graph.removeCells([child1])
console.log(parent.toJSON().children)预期行为
将父节点进行序列化之后,其children数组中不再包含已删除子节点的ID
平台
无
屏幕截图或视频(可选但最好有)
No response
补充说明(可选)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
waiting for authorFurther information is requested from the authorFurther information is requested from the author