Skip to content

拖拽节点生成的画布,如何获取其相关节点数据呢,处理一下传给后端 #2042

Answered by NewByVector
xiazhaohui asked this question in Q&A
Discussion options

You must be logged in to vote

画布上所有元素的数据可以通过以下方法拿到:

graph.toJSON()

单个节点的业务数据,可以放在 data 属性中

graph.setData(daa)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xiazhaohui
Comment options

Answer selected by NewByVector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants