端到端功能 图形与连线的层级大小问题
This commit is contained in:
parent
d8b9ac9fe6
commit
c068e9195f
Binary file not shown.
@ -536,7 +536,7 @@ Schema.addShape({name:"method_service_node4", title:"人工任务", text:"人工
|
|||||||
{lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"round"}}
|
{lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"round"}}
|
||||||
]});
|
]});
|
||||||
|
|
||||||
Schema.addShape({name:"callActivityCallingProcess", title:"子流程", text:"子流程", category:"process_subprocess", groupName:"", props:{w:100, h:70},
|
Schema.addShape({name:"subProcess", title:"子流程", text:"子流程", category:"process_subprocess", groupName:"", props:{w:100, h:70},
|
||||||
fillStyle:{color:"153,255,255"},
|
fillStyle:{color:"153,255,255"},
|
||||||
path:[
|
path:[
|
||||||
{lineStyle:{lineWidth:"lineWidth", lineStyle:"solid"}, actions:{ref:"roundRectangle"}},
|
{lineStyle:{lineWidth:"lineWidth", lineStyle:"solid"}, actions:{ref:"roundRectangle"}},
|
||||||
|
|||||||
@ -30,6 +30,7 @@ public class GraphRender {
|
|||||||
private PALRepositoryModel repositoryModel;
|
private PALRepositoryModel repositoryModel;
|
||||||
private BaseModel baseModel;
|
private BaseModel baseModel;
|
||||||
private Map<String, String> idMap;
|
private Map<String, String> idMap;
|
||||||
|
private long zIndex;
|
||||||
|
|
||||||
|
|
||||||
public GraphRender(PALRepositoryModel repositoryModel, List<Node> nodeList, double width, double height) {
|
public GraphRender(PALRepositoryModel repositoryModel, List<Node> nodeList, double width, double height) {
|
||||||
@ -73,6 +74,7 @@ public class GraphRender {
|
|||||||
JSONObject subProcessNodeProps = subProcessNode.getJSONObject("props");
|
JSONObject subProcessNodeProps = subProcessNode.getJSONObject("props");
|
||||||
subProcessNodeProps.put("x", position[i][0]);
|
subProcessNodeProps.put("x", position[i][0]);
|
||||||
subProcessNodeProps.put("y", position[i][1]);
|
subProcessNodeProps.put("y", position[i][1]);
|
||||||
|
subProcessNodeProps.put("zindex", zIndex++);
|
||||||
subProcessNode.put("text", repositoryModel.getName());
|
subProcessNode.put("text", repositoryModel.getName());
|
||||||
|
|
||||||
// 处理子流程模型节点形状属性
|
// 处理子流程模型节点形状属性
|
||||||
@ -132,6 +134,8 @@ public class GraphRender {
|
|||||||
if (linkers != null && linkers.size() > 0){
|
if (linkers != null && linkers.size() > 0){
|
||||||
for (Object obj : linkers) {
|
for (Object obj : linkers) {
|
||||||
JSONObject linker = (JSONObject) obj;
|
JSONObject linker = (JSONObject) obj;
|
||||||
|
JSONObject props = linker.getJSONObject("props");
|
||||||
|
props.put("zindex", zIndex++);
|
||||||
JSONObject fromObj = linker.getJSONObject("from");
|
JSONObject fromObj = linker.getJSONObject("from");
|
||||||
String fromId = idMap.get(fromObj.getString("id"));
|
String fromId = idMap.get(fromObj.getString("id"));
|
||||||
fromObj.put("id", fromId);
|
fromObj.put("id", fromId);
|
||||||
|
|||||||
@ -284,12 +284,13 @@ public class SubProcessWeb extends ActionWeb {
|
|||||||
|
|
||||||
CoeProcessLevelDaoFacotory.createCoeProcessLevel().insert(model);
|
CoeProcessLevelDaoFacotory.createCoeProcessLevel().insert(model);
|
||||||
|
|
||||||
// 节点渲染
|
|
||||||
GraphRender graphRender = new GraphRender(model, nodeList, graphLayout.getCanvasWidth(), graphLayout.getCanvasHeight());
|
GraphRender graphRender = new GraphRender(model, nodeList, graphLayout.getCanvasWidth(), graphLayout.getCanvasHeight());
|
||||||
graphRender.handleShapeNodeRender(position);
|
|
||||||
|
|
||||||
// 连线渲染
|
// 连线渲染
|
||||||
graphRender.handShapeLinkerRender(linkers);
|
graphRender.handShapeLinkerRender(linkers);
|
||||||
|
// 节点渲染
|
||||||
|
graphRender.handleShapeNodeRender(position);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user