diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index 04294de3..57c97ef1 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/util/DiagramUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/util/DiagramUtil.java deleted file mode 100644 index 1ef868a5..00000000 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/util/DiagramUtil.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.actionsoft.apps.coe.pal.pal.repository.util; - -import com.alibaba.fastjson.JSONObject; - -import java.util.Iterator; - -public class DiagramUtil { - - - /** - * 设置画布大小 - * @param elements - */ - public static void setDiagramHeightWidth(JSONObject definition, JSONObject elements) { - // 获取最大宽高,给100长度富余 - JSONObject maxHW = getMaxPositionXY(elements); - int maxX = maxHW.getInteger("maxX") + 150; - int maxH = maxHW.getInteger("maxY") + 150; - JSONObject page = definition.getJSONObject("page"); - int pageW = page.getInteger("width"); - int pageH = page.getInteger("height"); - page.put("width", pageW > maxX ? pageW : maxX); - page.put("height", pageH > maxH ? pageH : maxH); - definition.put("page", page); - } - - - - public static JSONObject getMaxPositionXY(JSONObject elements) { - int maxX = -99999; - int maxY = -99999; - Iterator it = elements.keySet().iterator(); - while (it.hasNext()) { - String key = it.next(); - JSONObject shape = elements.getJSONObject(key); - String shapeName = shape.getString("name"); - if(!"linker".equals(shapeName)) { - JSONObject props = shape.getJSONObject("props"); - int x = props.getInteger("x"); - int y = props.getInteger("y"); - maxX = maxX < x ? x : maxX; - maxY = maxY < y ? y : maxY; - } - } - JSONObject result = new JSONObject(); - result.put("maxX", maxX); - result.put("maxY", maxY); - return result; - } -} diff --git a/com.actionsoft.apps.coe.pal/template/page/main.htm b/com.actionsoft.apps.coe.pal/template/page/main.htm index 1bd4a51c..7717df1d 100644 --- a/com.actionsoft.apps.coe.pal/template/page/main.htm +++ b/com.actionsoft.apps.coe.pal/template/page/main.htm @@ -1,15 +1,15 @@ -CoE PAL流程资产库