You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
想要实现一个自定义节点类型A,它内部包含多个image节点, A的外部会可能有多条线连接到A内部的各个子shape,如下图所示
我的思路是:
1.获取到A所在的group
nodeA.getContainer()
2.找到内部的子shape
subA = group.find(element => element.get('name') === '子shape的唯一name'))
3.创建外部节点到子shape的连线
edge:[{
source: '外部node的id',
target: 'subA.id' //2中找到的sub-shape
}]
自定义节点中也配置了subA的id,但上面步骤3并不生效,无法创建edge。
请问上述步骤的问题在哪,以及这种场景有没有什么其他方案?
Beta Was this translation helpful? Give feedback.
All reactions