diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.core.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.core.js
index 6c7ae0eb..0b94d182 100755
--- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.core.js
+++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.core.js
@@ -4069,18 +4069,18 @@ var Designer = {
}
}
var key = q.name;
- if (specialShapeConfig == undefined) {
+ if (specialShapeConfig == undefined || specialShapeConfig.length == 0) {
if (commonShapeConfig != undefined && commonShapeConfig[key] != undefined) {
commonShapeConfig = commonShapeConfig[key];
this.handleShapeConfigData(commonShapeConfig, q, attributesJsonArray);
}
} else {
- if (commonShapeConfig == undefined) {
+ if (commonShapeConfig == undefined || commonShapeConfig.length == 0) {
this.handleShapeConfigData(Utils.copy(specialShapeConfig), q, attributesJsonArray);
} else {
commonShapeConfig = commonShapeConfig[key];
var tempCommonShapeConfig = [];
- if (commonShapeConfig != undefined) {
+ if (commonShapeConfig != undefined && commonShapeConfig.length > 0) {
var dataArray = [];
var tempArray = [];
for (i = 0; i < commonShapeConfig.length; i++) {
@@ -4572,6 +4572,138 @@ var Designer = {
m(j, l, o)*/
}
function m(c, y, x) {
+ if (c.showType == 'icon' && x.indexOf("") >= 0) {// 图标重构
+ var h = c.horizontal;
+ var I = c.vertical;
+ var icon = x.split("|")[0];
+ var iconColor = x.split("|")[1];
+ var H = $("
" + icon + "
").appendTo($("#" + i.id));
+ var D = 0;
+ var a = 20;
+ if (x != "") {
+ D += 20
+ }
+ var E, F;
+ if (h == "mostleft") {// 左外边
+ E = -D - 2
+ } else if (h == "leftedge") {// 左线上
+ E = -D / 2
+ } else if (h == "left") {// 左内边
+ E = 2
+ } else if (h == "center") {// 中间
+ E = (i.props.w - D) / 2;
+ } else if (h == "right") {// 右内边
+ E = i.props.w - D - 2;
+ } else if (h == "rightedge") {// 右线上
+ E = i.props.w - D / 2
+ } else if (h == "mostright"){// 右外边
+ E = i.props.w + 2
+ }
+ if (I == "mosttop") {// 上外边
+ F = -a
+ } else if (I == "topedge") {// 上线上
+ F = -a / 2
+ } else if (I == "top") {// 上内边
+ F = 0
+ } else if (I == "middle") {// 中间
+ F = (i.props.h - a) / 2
+ } else if (I == "bottom") {// 下内边
+ F = i.props.h - a
+ } else if (I == "bottomedge") {// 下线上
+ F = i.props.h - a / 2
+ } else if (I == "mostbottom"){// 下外边
+ F = i.props.h
+ }
+ var g = {
+ x: E,
+ y: F,
+ w: D,
+ h: a
+ };
+ var G = Utils.getRotatedBox(g, i.props.angle, n);
+ H.attr({
+ width: G.w.toScale(),
+ height: G.h.toScale()
+ });
+ var d = (G.x + (i.props.x - k.x) + 10).toScale();
+ var e = (G.y + (i.props.y - k.y) + 10).toScale();
+ if (h != "mostleft" || h == "left" || h != "right") {
+ H.css({
+ left: d,
+ top: e
+ });
+ }
+ if (D > i.props.w) {
+ var tempShapeWidth = i.props.w;
+ if (tempShapeWidth < 100) {
+ tempShapeWidth = 100;
+ }
+ H[0].width = tempShapeWidth + 10;
+ H[0].height = Math.ceil(D / tempShapeWidth) * 10 + 15;
+ if (h == "mostleft") {
+ d = -tempShapeWidth + tempShapeWidth*0.2;
+ H.css({
+ left: d,
+ top: e
+ });
+ }
+ if (h == "left") {
+ H.css({
+ left: d,
+ top: e - 5
+ });
+ }
+ if (h == "left" && I != "bottom") {
+ H.css({
+ left: d,
+ top: e
+ });
+ }
+ if (h == "right") {
+ d = tempShapeWidth / 4;
+ H.css({
+ left: d,
+ top: e - 5
+ });
+ }
+ if (I == "mosttop" || I == "bottom") {
+ e = e - Math.ceil(D / tempShapeWidth) * 5;
+ H.css({
+ left: d,
+ top: e
+ });
+ }
+ if (h == "center" && Math.ceil(D / tempShapeWidth) > 1) {
+ H.css({
+ left: 15,
+ top: e
+ });
+ }
+ if (h == "right" && I != "mosttop" && I != "bottom") {
+ d = tempShapeWidth / 4;
+ H.css({
+ left: d,
+ top: e
+ });
+ }
+ } else {
+ if (h == "mostleft") {
+ d = -D;
+ H.css({
+ left: d,
+ top: e
+ });
+ }
+ if (h == "right") {
+ d = i.props.w - D;
+ H.css({
+ left: d,
+ top: e
+ });
+ }
+ }
+ return;
+ }
var h = c.horizontal;
var I = c.vertical;
var H = $("").appendTo($("#" + i.id));