antvis / antvis/X6

当给被设置为父节点({parent:true})的节点中添加子节点,然后再删除子节点,转换成json时children属性中的数据未清除

Open
#2,584 4 comments 0 reactions 0 assignees View on GitHub
bug 🐛 oscp
Dominant language
TypeScript
Stars
6.7k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

1、设置一个可以成为父节点的节点,{parent: true}
2、给该父节点放置一个子节点
3、再将该父节点中的子节点删除
4、转换成json数据时,该父节点中的children属性数据未及时清除

### Your Example Website or App

https ://stackoverflow.com/help/mcve

### Steps to Reproduce the Bug or Issue

1、设置一个可以成为父节点的节点,{parent: true}
2、给该父节点放置一个子节点
3、再将该父节点中的子节点删除
4、转换成json数据时,该父节点中的children属性数据未及时清除

### Expected behavior

修正问题描述,及时清除children

### Screenshots or Videos

_No response_

### Platform

- OS: [Windows]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in X6 by creating a node with {parent: true}, adding and removing a child, then converting the graph to JSON. Trace the node serialization and child-removal lifecycle; done means the parent’s children data is cleared from the JSON after its last child is deleted.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.