Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

求教关于类似 flow-rhombus 自定义菱形结点中间加个图片的问题 #106

Open
winken168 opened this issue Mar 21, 2019 · 1 comment

Comments

@winken168
Copy link

我想注册个自定义一个类似flow-rhombus 中间加个图片的结点,请问 draw 里面该如何写呢?求教个示例。。。

G6Editor.Flow.registerNode("flow-fork", {
draw(item) {
//这里的代码如何写呢 ???
。。。。。。
return keyShape;
}, "flow-rhombus");

@guozhaolong
Copy link

draw有两个参数cfg和group,你在里面直接group.addShape('image',{attr:xxxx}),你去看一下文档里面有写添加图片

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants