默认效果
希望改进的效果
git 项目地址、希望大神指导 QQ群432942630
https://github.com/iloveplus/myflow
https://blog.csdn.net/sleepwalker_1992/article/details/82709793
连接线在加载的时候更改
var restore=restore();
$(function () {
$('#myflow').myflow(
{
basePath: "",
restore: restore,
tools: {}
}
);
});
}
restore=function(){
var restore={};
//节点
restore["states"]={};
restore["states"]["rect"+不重复数字]={
type : 对应节点,
text : { text : 节点名称 },
props: {
text: { value: text } },
attr: {
height: 节点高度,
width:节点宽度,
x: 节点宽度,
y: 节点位置 }
};
restore["paths"]={};
restore["paths"]["path"+不重复数字]={
from:父节点,
to:子工序,
///////////////////////曲折位置设置曲折位置达到加载曲折
dots:{ 曲折次数:{
x:曲折x轴,y:曲折y轴 }
},
text: { text: path_name },
props: {
text: {
value: path_name } },
textPos: {x:偏移x,y:偏移y}
}
}