Replies: 1 comment
-
加载数据,如果没有数据怎么渲染呢,加载数据和渲染画布是分开的,加载数据用LOAD_DATA 渲染用GRAPH_RENDER 栗子🌰: app.executeCommandPipeline([
{
commandId: XFlowGraphCommands.LOAD_DATA.id,
getCommandOption: async () => {
return {
args: {
loadDataService: () => graphData,
},
};
},
},
{
commandId: XFlowGraphCommands.GRAPH_RENDER.id,
getCommandOption: async (ctx) => {
const { graphData } = ctx.getResult();
return {
args: {
graphData,
},
};
},
},
]); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
文档中说 LOAD_DATA 命令可用于从服务端获取图数据,在 loadDataService 中将 graphData return 出来。
我本以为会自动将 graphData 渲染到画布上,但完全没有啊。
所有这个命令到底有什么作用呢?
Beta Was this translation helpful? Give feedback.
All reactions