antvis / X6

🚀 JavaScript diagramming library that uses SVG and HTML for rendering.
https://x6.antv.antgroup.com
MIT License
5.8k stars 1.71k forks source link

mindmap 示例节点id重复 #3256

Closed lloydzhou closed 1 year ago

lloydzhou commented 1 year ago

Describe the bug

节点id重复导致计算布局的时候考虑了节点位置,但是不在图上面展示

Your Example Website or App

https://x6.antv.vision/en/examples/showcase/practices#mindmap

Steps to Reproduce the Bug or Issue

  1. 创建3个子主题 image
  2. 移除中间的子主题 image
  3. 创建新的子主题 image
  4. 由于节点id重复导致计算布局的时候有计算位置,但是x6渲染节点的时候发现节点重复,所以不渲染。

Expected behavior

新添加节点应该正常显示

这里有一个使用x6-hooks重写官方demo的时候发现这个问题,并修复后的版本。 https://codesandbox.io/s/x6-hooks-react-mindmap-demo-2t6954?file=/src/App.js

Screenshots or Videos

No response

Platform

Additional context

No response

x6-bot[bot] commented 1 year ago

🎉 This issue has been resolved in the following release 🎉

Thanks for being a part of the AntV community! 💪💯

x6-bot[bot] commented 1 year ago

🎉 This issue has been resolved in the following release 🎉

Thanks for being a part of the AntV community! 💪💯

x6-bot[bot] commented 9 months ago

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.