-
Describe the bug / 问题描述import { Graph } from '@antv/g6'; Reproduction link / 复现链接https://g6.antv.antgroup.com/examples/layout/force-directed/#force Steps to Reproduce the Bug or Issue / 重现步骤将贴的数据放到官方demo就会出现e.getPorts is not a function这个报错 Version / 版本🆕 5.x OS / 操作系统
Browser / 浏览器
|
Beta Was this translation helpful? Give feedback.
Answered by
dullzb
Apr 2, 2025
Replies: 2 comments
-
|
由于 节点 ID 和边 ID 出现重复,导致 G6 在处理端口(port)信息时出错。G6 可能在解析边时误认为某个 ID 是一个节点,而这个“节点”并没有 getPorts 方法。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
给 node 和 edge 统一加前缀,避免 ID 冲突。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yvonneyx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
给 node 和 edge 统一加前缀,避免 ID 冲突。