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 453c1b4e..4cb49d7d 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/pal/repository/PALRepositoryQueryAPIManager.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java index af18201e..0ab4dea0 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java @@ -4332,9 +4332,8 @@ public class PALRepositoryQueryAPIManager { //特殊处理shape外属性显示内容被切割问题 boolean addEmptyFlag = false; String str = ""; - int maxX = 0; - int maxY = 0; - int maxW = 0; + int rightBoundary = 0; // 记录图最右侧边界值 + int bottomBoundary = 0; // 记录图最下侧边界值 boolean isRight = false; JSONObject defineObj = JSON.parseObject(define); if (defineObj.containsKey("elements")) { @@ -4372,18 +4371,12 @@ public class PALRepositoryQueryAPIManager { if (null == props) { continue; } - Integer x = props.getInteger("x"); - if (null != x && x > maxX) { - maxX = x; - } - Integer y = props.getInteger("y"); - if (null != y && y > maxY) { - maxY = y; - } - Integer w = props.getInteger("w"); - if (null != w && w > maxW){ - maxW = w; - } + int x = props.getIntValue("x"); + int y = props.getIntValue("y"); + int w = props.getIntValue("w"); + int h = props.getIntValue("h"); + rightBoundary = Math.max(x + w, rightBoundary); + bottomBoundary = Math.max(y + h, bottomBoundary); } } @@ -4394,12 +4387,12 @@ public class PALRepositoryQueryAPIManager { if (textShape != null && textShape.containsKey("props")) { JSONObject props = textShape.getJSONObject("props"); props.put("w", 100); - props.put("y", maxY); + props.put("y", bottomBoundary); props.put("h", 50); if (isRight) { - props.put("x", maxX + maxW + (str.length() * 2)); + props.put("x", rightBoundary + (str.length() * 2)); } else { - props.put("x", maxX - (str.length() * 2)); + props.put("x", rightBoundary - (str.length() * 2)); } elements.put(textShape.getString("id"), textShape);