antvis/G6

使用registerNode自定义时报错 #3343

i7eo posted onGitHub

<!-- ⚠️ ⚠️ ⚠️ 注意:请使用下面的链接来新建 issue: ⚠️ ⚠️ ⚠️ https://antv-issue-helper.surge.sh 不是用上面的链接创建的 issue 会被立即关闭。 -->

我想使用registerNode来做一个新的结点,这个新节点中只是使用内置图形进行一些组合。但是在 registerNode 中使用 group.addShape('diamond', { //...}) 会 crash 。使用 rect/ circle 就正常。。。

复现链接:https://codesandbox.io/s/youthful-silence-659vv?file=/index.js:660-687 上述链接中的代码是从官网例子而来


Fund this Issue

$0.00
Funded

Pull requests