From bfe436e493006bea75d32383d6bdfc0af8c7e5d0 Mon Sep 17 00:00:00 2001 From: surprise <15810472099@163.com> Date: 星期四, 19 十月 2023 13:44:19 +0800 Subject: [PATCH] 图层组透明度,临时图层组 --- src/views/plotting/attributeInfo.vue | 28 ++++++++++++++++++++++------ 1 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/views/plotting/attributeInfo.vue b/src/views/plotting/attributeInfo.vue index 5b0795e..ef132b4 100644 --- a/src/views/plotting/attributeInfo.vue +++ b/src/views/plotting/attributeInfo.vue @@ -22,15 +22,18 @@ </div> <div class="contentBox" v-show="showEntity.label"> <div class="contentLabel"> <label>鍐呭</label></div> - <div class="contentmenu"><el-input size="mini" v-model="fromLine.text"></el-input></div> + <div class="contentmenu"><el-input size="mini" @change="setEntityTextChange" v-model="fromLine.text"></el-input> + </div> </div> <div class="contentBox" v-show="showEntity.label"> <div class="contentLabel"> <label>瀛椾綋</label></div> - <div class="contentmenu"><el-input size="mini" v-model="fromLine.font"></el-input></div> + <div class="contentmenu"><el-input size="mini" @change="setEntityFontChange" v-model="fromLine.font"></el-input> + </div> </div> <div class="contentBox" v-show="showEntity.label"> <div class="contentLabel"> <label>姣斾緥澶у皬</label></div> - <div class="contentmenu"><el-input size="mini" v-model="fromLine.scale"></el-input></div> + <div class="contentmenu"><el-input size="mini" @change="setEntityScaleChange" v-model="fromLine.scale"></el-input> + </div> </div> <div class="contentBox" v-show="showEntity.point"> <div class="contentLabel"> <label>澶у皬</label></div> @@ -145,6 +148,16 @@ entity.value.name = fromLine.value.cnName; store.state.editTemporarName = fromLine.value.cnName; }; +const setEntityTextChange = () => { + entity.value.label.text._value = fromLine.value.text +} +const setEntityFontChange = () => { + entity.value.label.font._value = fromLine.value.font; +} +const setEntityScaleChange = () => { + entity.value.label.scale._value = fromLine.value.scale; +} + const setEntitySizeChange = () => { entity.value.point._pixelSize._value = parseInt(fromLine.value.size); }; @@ -156,12 +169,11 @@ break; case "label": entity.value.label.disableDepthTestDistance = - fromLine.value.heightReference == true ? null : false; + fromLine.value.heightReference == true ? null : Number.POSITIVE_INFINITY; break; case "polyline": entity.value.polyline.clampToGround = fromLine.value.heightReference; break; - } }; const setEntityOutLineWidthReferenceChange = () => { @@ -202,9 +214,11 @@ } else if (type == 'polyline') { if (fromLine.value.outline) { entity.value.polyline.material.outlineWidth._value = fromLine.value.width; + } else { entity.value.polyline.material.outlineWidth._value = null; } + entity.value.outline = fromLine.value.outline } else if (type == 'rectangle') { entity.value.rectangle.outline._value = fromLine.value.outline; @@ -217,7 +231,9 @@ store.state.editTemporaryback = entity._value.id; store.state.setEditTemporaryShow = false; store.state.editTemporaryId = null; - sgworld.Creator.SimpleGraphic.SimpleGraphicObj=[]; + sgworld.Creator.SimpleGraphic.edit(false, { editProp: false }); + sgworld.Creator.SimpleGraphic.SimpleGraphicObj = []; + }; const setEntityMaterColorChange = () => { -- Gitblit v1.9.3