antvis/G6

G6 Dagre布局中 controlPoints:为true时,拖动节点所属的combo,节点上的edge连接点出现飘移 #4655

PLS-ToNy posted onGitHub

问题描述

G6 Dagre布局中 controlPoints:为true时,拖动自定义节点所属的自定义combo,自定义节点上的自定义edge连接点出现飘移 节点与节点间存在多条连线的情况,故使用了controlPoints 在自定义edge中使用getPath也会出现该问题 getPath(cfg) { console.log('🐻', '====GetPathCfg====', cfg); const startPoint = cfg[0]; const endPoint = cfg[1]; const deltaY = endPoint.y - startPoint.y; return [ ['M', startPoint.x, startPoint.y], ['L', endPoint.x, endPoint.y], ]; },

重现链接

重现步骤

https://github.com/antvis/G6/assets/62326846/242bd8dd-dece-4dbb-8088-b8ba535c38dc

预期行为

https://github.com/antvis/G6/assets/62326846/d1bfb184-638f-458a-a94d-dc053796b270

希望可以解决飘移问题 或 提供不使用controlPoints也可显示两个节点间多条连线的方法(尽量不使用有弧度的连线)

平台

  • 操作系统: [Windows]
  • 网页浏览器: [Google Chrome]
  • G6 版本: [4.8.15 ]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response


可以给 graph 配置 linkCenter: true 试试,这样就始终连接到节点中心

posted by Yanyan-Wang almost 2 years ago

使用 linkCenter: true 可以解决漂移问题但是两个节点间的多条连线无法展示了 image image

posted by PLS-ToNy almost 2 years ago

给个在线复现 demo?

posted by Yanyan-Wang almost 2 years ago

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests