|
@@ -39,6 +39,8 @@
|
|
|
<script>
|
|
|
import attrSelect from "@/components/edit/attr_select";
|
|
|
import bus from "@/bus";
|
|
|
+import { SImageMarkerItem } from '../../lib/items/SImageMarkerItem';
|
|
|
+import { SImageLegendItem } from '../../lib/items/SImageLegendItem';
|
|
|
|
|
|
const msgList = [
|
|
|
{
|
|
@@ -61,13 +63,13 @@ const msgList = [
|
|
|
},
|
|
|
{
|
|
|
msg: "",
|
|
|
- disable: false,
|
|
|
+ disable: true,
|
|
|
name: "Width",
|
|
|
unit: "w"
|
|
|
},
|
|
|
{
|
|
|
msg: "",
|
|
|
- disable: false,
|
|
|
+ disable: true,
|
|
|
name: "Height",
|
|
|
unit: "h"
|
|
|
}
|
|
@@ -177,22 +179,20 @@ export default {
|
|
|
if (item.name == "Width") {
|
|
|
item.msg = Item.boundingRect().width;
|
|
|
// 针对icon 以及图片
|
|
|
- if (
|
|
|
- Item.data &&
|
|
|
- Item.data.GraphElementType &&
|
|
|
- Item.data.GraphElementType == "Image"
|
|
|
- ) {
|
|
|
- item.msg = Item.width;
|
|
|
+ if (Item instanceof SImageMarkerItem || Item instanceof SImageLegendItem) {
|
|
|
+ item.disable = false;
|
|
|
+ // item.msg = Item.width;
|
|
|
+ } else {
|
|
|
+ item.disable = true;
|
|
|
}
|
|
|
}
|
|
|
if (item.name == "Height") {
|
|
|
item.msg = Item.boundingRect().height;
|
|
|
- if (
|
|
|
- Item.data &&
|
|
|
- Item.data.GraphElementType &&
|
|
|
- Item.data.GraphElementType == "Image"
|
|
|
- ) {
|
|
|
- item.msg = Item.height;
|
|
|
+ if (Item instanceof SImageMarkerItem || Item instanceof SImageLegendItem) {
|
|
|
+ item.disable = false;
|
|
|
+ // item.msg = Item.height;
|
|
|
+ } else {
|
|
|
+ item.disable = true;
|
|
|
}
|
|
|
}
|
|
|
});
|