apps/com.actionsoft.apps.coe.pal/method/process.scheme/diagram.schema.tpl

54 lines
2.0 KiB
Smarty
Raw Normal View History

/**
* Scheme
*/
Schema.addCategory({
name: "process_scheme",
text: "方案图",
dataAttributes: []
});
/***纸牌Card*/Schema.addShape({name:"card", title:"方案", text:"方案", category:"process_scheme", props:{w:100, h:70}, path:[
{actions:[
{action:"move", x:"0", y:"Math.min(h/2,w/4)"},
{action:"line", x:"Math.min(h/2,w/4)", y:"0"},
{action:"line", x:"w", y:"0"},
{action:"line", x:"w", y:"h"},
{action:"line", x:"0", y:"h"},
{action:"line", x:"0", y:"Math.min(h/2,w/4)"},
{action:"close"}
]}
]});
/*Item*/
Schema.addShape({name:"item1", title:"正文",text:"正文", category:"process_scheme", lineStyle:{lineWidth: 1},
props:{w:220, h:50}, textBlock:{x:"w*0.1", y:"2", w:"(w-Math.min(h/2,w/6))*0.8", h:"h-2"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, anchors:[
{x:"w*0.5", y:"0"},
{x:"w-Math.min(h/2,w/6)", y:"h*0.5"},
{x:"w*0.5", y:"h"},
{x:"0", y:"h*0.5"}
],path:[
{actions:[
{action:"move", x:"0", y:"0"},
{action:"line", x:"w", y:"0"},
{action:"line", x:"w-Math.min(h/2,w/6)", y:"h*0.5"},
{action:"line", x:"w", y:"h"},
{action:"line", x:"0", y:"h"},
{action:"line", x:"0", y:"0"},
{action:"close"}
]}
]});
/***胶囊型Terminator*/Schema.addShape({name:"item2", title:"条款", text:"条款", category:"process_scheme",lineStyle:{lineWidth: 1},
props:{w:220, h:50},textBlock:{x:"Math.min(w,h)/3", y:"2", w:"w-(Math.min(w,h)/3)*2", h:"h-2"}, path:[
{actions:[
{action:"move", x:"Math.min(w,h)/3+5", y:"0"},
{action:"line", x:"w-Math.min(w,h)/3-5", y:"0"},
{action:"curve", x1:"w+Math.min(w,h)/3/3", y1:"0", x2:"w+Math.min(w,h)/3/3", y2:"h", x:"w-Math.min(w,h)/3-5", y:"h"},
{action:"line", x:"Math.min(w,h)/3+5", y:"h"},
{action:"curve", x1:"-Math.min(w,h)/3/3", y1:"h", x2:"-Math.min(w,h)/3/3", y2:"0", x:"Math.min(w,h)/3+5", y:"0"},
{action:"close"}
]}
]});