support custom icons

This commit is contained in:
codetypes committed 2024-04-17 13:29:10 +08:00
1 parent 1c0ac119f4
commit b81d9449c9
8 files changed
+16 -6

No files matched your search

+1 -1
View File
@@ -174,7 +174,7 @@ G6.registerNode(
});
// icon
const img = `./icons/${classify}.svg`;
const img = nodeDef.icon ? workspace.workdir + "/" + nodeDef.icon : `./icons/${classify}.svg`;
addShape("image", {
attrs: {
x: 5,