|
@@ -104,15 +104,16 @@ export default {
|
|
} else if (item.name == "Height") {
|
|
} else if (item.name == "Height") {
|
|
bus.$emit("itemHeight", item.msg);
|
|
bus.$emit("itemHeight", item.msg);
|
|
} else if (item.name == "X" || item.name == "Y") {
|
|
} else if (item.name == "X" || item.name == "Y") {
|
|
- let x,y=''
|
|
|
|
- this.msgList.forEach(t=>{
|
|
|
|
- if(t.name == 'X'){
|
|
|
|
- x = t.msg
|
|
|
|
- }else if(t.name == 'Y'){
|
|
|
|
- y = t.msg
|
|
|
|
|
|
+ let x,
|
|
|
|
+ y = "";
|
|
|
|
+ this.msgList.forEach(t => {
|
|
|
|
+ if (t.name == "X") {
|
|
|
|
+ x = t.msg;
|
|
|
|
+ } else if (t.name == "Y") {
|
|
|
|
+ y = t.msg;
|
|
}
|
|
}
|
|
- })
|
|
|
|
- bus.$emit("itemPositon", x,y);
|
|
|
|
|
|
+ });
|
|
|
|
+ bus.$emit("itemPositon", x, y);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -151,9 +152,24 @@ export default {
|
|
}
|
|
}
|
|
if (item.name == "Width") {
|
|
if (item.name == "Width") {
|
|
item.msg = Item.boundingRect().width;
|
|
item.msg = Item.boundingRect().width;
|
|
|
|
+ // 针对icon 以及图片
|
|
|
|
+ if (
|
|
|
|
+ Item.data &&
|
|
|
|
+ Item.data.GraphElementType &&
|
|
|
|
+ Item.data.GraphElementType == "Image"
|
|
|
|
+ ) {
|
|
|
|
+ item.msg = Item.width;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (item.name == "Height") {
|
|
if (item.name == "Height") {
|
|
item.msg = Item.boundingRect().height;
|
|
item.msg = Item.boundingRect().height;
|
|
|
|
+ if (
|
|
|
|
+ Item.data &&
|
|
|
|
+ Item.data.GraphElementType &&
|
|
|
|
+ Item.data.GraphElementType == "Image"
|
|
|
|
+ ) {
|
|
|
|
+ item.msg = Item.height;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|