在 jsPlumb 上保存和加载流程图的最佳方法是什么?
What's the best approach to save and load an flowchart on jsPlumb?
我设法通过简单地将所有元素包含在一个对象数组中来保存图表,其中每个对象都有 source 和 目标节点,x,y坐标.
I managed to save the chart by simply having all the elements inside an array of objects, where each object has source and target nodes, x, y coordinates.
保存时,只需执行JSON.stringify(whole_object),如果加载,则只需JSON.parse() 并手动定位节点并连接它们.
When saving, simply do JSON.stringify(whole_object), and if loading, simply JSON.parse() and manually position the nodes as well as connect them.
这篇关于在 jsPlumb 上保存和加载流程图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
用于创建头像的 jQuery/JavaScript 库?jQuery/JavaScript Library for avatar creation?(用于创建头像的 jQuery/JavaScript 库?)
如何做以下掩码输入问题?How to do following mask input problem?(如何做以下掩码输入问题?)
使用 DropKick Javascript 设置值/标签的问题Issues Setting Value/Label Using DropKick Javascript(使用 DropKick Javascript 设置值/标签的问题)
如何对 jquery 插件中的私有方法进行单元测试?how to unit-test private methods in jquery plugins?(如何对 jquery 插件中的私有方法进行单元测试?)
stellar.js - 为垂直滚动网站配置偏移量/对齐元素stellar.js - configuring offsets / aligning elements for a vertical scrolling website?(stellar.js - 为垂直滚动网站配置偏移量/对齐元素?)
jQuery 屏蔽输入插件.当文本框获得焦点时选择所有jQuery masked input plugin. select all content when textbox receives focus(jQuery 屏蔽输入插件.当文本框获得焦点时选择所有内容)