antvis / G6

♾ A Graph Visualization Framework in JavaScript.
https://g6.antv.antgroup.com/
MIT License
11.15k stars 1.33k forks source link

Using antv-dagre layout + custom node + polyline edge, the position is out of place when the element is expanded and collapsed #6389

Closed XKrabs closed 3 weeks ago

XKrabs commented 1 month ago

Describe the bug / 问题描述

使用antv-dagre布局+自定义节点+polyline边,在对元素进行展开收起操作时位置错乱

Reproduction link / 重现链接

https://codesandbox.io/p/sandbox/confident-mountain-6r8x98?file=%2Findex.js

Steps to Reproduce the Bug or Issue / 重现步骤

点击中间的收起节点,然后在点击展开,

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

macOS

Browser / 浏览器

Chrome

Additional context / 补充说明

No response

yvonneyx commented 1 month ago

antv-dagre 布局每次数据变更后需要手动执行 graph.layout()

zhangkb commented 1 month ago

image 如果是这个问题的话你设置一下布局的nodeSize估计就解决了

yvonneyx commented 1 month ago

如果问题已解决,记得关闭 issue 哦❤️

yvonneyx commented 3 weeks ago

由于目前没有进一步的信息,我们将暂时关闭此问题。如果您在尝试我们的建议后仍然遇到问题,或者有更多的细节可以提供,请随时重新打开此issue,或者发起一个新的 issue 🌹