[Bug]: Custom g2 node update exception drawing
- Dominant language
- TypeScript
- Stars
- 12.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug / 问题描述
使用了两种方法去更新自定义节点。
1. 使用updateData
使用此方法在连续两次给同一节点绘制时,edge路径异常、绘制的窗口也不会居中。
2. 使用删除(removeData)再添加(addData)
使用这个方法在每次更新只会执行删除或者添加二选一,此外当有多个添加的数据时绘制的窗口也不会居中。


### Reproduction link / 复现链接
https://codesandbox.io/p/sandbox/silly-snowflake-7dp2mc
### Steps to Reproduce the Bug or Issue / 重现步骤
_No response_
### G6 Version / G6 版本
🆕 5.x
### OS / 操作系统
- [ ] macOS
- [X] Windows
- [ ] Linux
- [ ] Others / 其他
### Browser / 浏览器
- [X] Chrome
- [x] Edge
- [ ] Firefox
- [ ] Safari (Limited support / 有限支持)
- [ ] IE (Nonsupport / 不支持)
- [ ] Others / 其他
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked CodeSandbox reproduction and inspect the G6 5.x behavior for custom g2 nodes. Compare repeated updateData calls with removeData followed by addData, focusing on edge paths and whether the drawing window centers when multiple nodes are added. Done means both update approaches consistently render the expected edges and centered view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100