|
@@ -37,7 +37,7 @@
|
|
<a-icon type="caret-down" class="down-icon" />
|
|
<a-icon type="caret-down" class="down-icon" />
|
|
</div>
|
|
</div>
|
|
<a-menu slot="overlay">
|
|
<a-menu slot="overlay">
|
|
- <a-menu-item v-for="item in alignmentOptions" :key="item.value" @click="changeAlignItem(item.value)">
|
|
|
|
|
|
+ <a-menu-item :disabled='item.disable' v-for="item in alignmentOptions" :key="item.value" @click="changeAlignItem(item.value)">
|
|
<img style="width: 16px;margin-right: 5px;" :src="require(`./../../assets/images/`+item.img+`.png`)" alt />
|
|
<img style="width: 16px;margin-right: 5px;" :src="require(`./../../assets/images/`+item.img+`.png`)" alt />
|
|
<span>{{item.label}}</span>
|
|
<span>{{item.label}}</span>
|
|
</a-menu-item>
|
|
</a-menu-item>
|
|
@@ -89,42 +89,50 @@ export default {
|
|
{
|
|
{
|
|
value: SGraphLayoutType.Left,
|
|
value: SGraphLayoutType.Left,
|
|
label: "左对齐",
|
|
label: "左对齐",
|
|
- img: "t-left"
|
|
|
|
|
|
+ img: "t-left",
|
|
|
|
+ disable:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
value: SGraphLayoutType.Right,
|
|
value: SGraphLayoutType.Right,
|
|
label: "右对齐",
|
|
label: "右对齐",
|
|
- img: "t-right"
|
|
|
|
|
|
+ img: "t-right",
|
|
|
|
+ disable:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
value: SGraphLayoutType.Top,
|
|
value: SGraphLayoutType.Top,
|
|
label: "顶对齐",
|
|
label: "顶对齐",
|
|
- img: "t-top"
|
|
|
|
|
|
+ img: "t-top",
|
|
|
|
+ disable:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
value: SGraphLayoutType.Bottom,
|
|
value: SGraphLayoutType.Bottom,
|
|
label: "底对齐",
|
|
label: "底对齐",
|
|
- img: "t-bottom"
|
|
|
|
|
|
+ img: "t-bottom",
|
|
|
|
+ disable:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
value: SGraphLayoutType.Center,
|
|
value: SGraphLayoutType.Center,
|
|
label: "水平居中对齐",
|
|
label: "水平居中对齐",
|
|
- img: "t-center"
|
|
|
|
|
|
+ img: "t-center",
|
|
|
|
+ disable:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
value: SGraphLayoutType.Middle,
|
|
value: SGraphLayoutType.Middle,
|
|
label: "垂直居中对齐",
|
|
label: "垂直居中对齐",
|
|
- img: "t-topandbottm"
|
|
|
|
|
|
+ img: "t-topandbottm",
|
|
|
|
+ disable:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
value: SGraphLayoutType.Vertical,
|
|
value: SGraphLayoutType.Vertical,
|
|
label: "垂直分布",
|
|
label: "垂直分布",
|
|
- img: "t-vertical"
|
|
|
|
|
|
+ img: "t-vertical",
|
|
|
|
+ disable:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
value: SGraphLayoutType.Horizontal,
|
|
value: SGraphLayoutType.Horizontal,
|
|
label: "水平分布",
|
|
label: "水平分布",
|
|
- img: "t-level"
|
|
|
|
|
|
+ img: "t-level",
|
|
|
|
+ disable:true,
|
|
}
|
|
}
|
|
],
|
|
],
|
|
scale: 0.5, //底图缩放比例
|
|
scale: 0.5, //底图缩放比例
|
|
@@ -182,10 +190,17 @@ export default {
|
|
bus.$emit('changeScale', this.scale / oldScale)
|
|
bus.$emit('changeScale', this.scale / oldScale)
|
|
},
|
|
},
|
|
FocusItemChanged(itemMsg) {
|
|
FocusItemChanged(itemMsg) {
|
|
- this.focusItem = null;
|
|
|
|
|
|
+ this.focusItem = null;
|
|
|
|
+ this.alignmentOptions.forEach(el=>{
|
|
|
|
+ el.disable = true
|
|
|
|
+ })
|
|
if (itemMsg.itemList.length == 1) {
|
|
if (itemMsg.itemList.length == 1) {
|
|
this.isLock = itemMsg.itemList[0].moveable;
|
|
this.isLock = itemMsg.itemList[0].moveable;
|
|
this.focusItem = itemMsg.itemList[0];
|
|
this.focusItem = itemMsg.itemList[0];
|
|
|
|
+ }else if (itemMsg.itemList.length > 1) {
|
|
|
|
+ this.alignmentOptions.forEach(el=>{
|
|
|
|
+ el.disable = false
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
lockItem() {
|
|
lockItem() {
|