bill 2 年之前
父节点
当前提交
ac391be587
共有 3 个文件被更改,包括 18 次插入1 次删除
  1. 3 0
      src/graphic/Renderer/Draw.js
  2. 15 1
      src/views/scene/covers/fixPoints.vue
  3. 二进制
      src/views/scene/covers/icon/loading.zip

+ 3 - 0
src/graphic/Renderer/Draw.js

@@ -1161,6 +1161,9 @@ export default class Draw {
 
   // 文字
   drawText(vector) {
+    if (!vector.value) {
+      return;
+    }
     this.context.save();
     const [_, foo] = help.setVectorStyle(this.context, vector);
 

+ 15 - 1
src/views/scene/covers/fixPoints.vue

@@ -23,7 +23,13 @@
     />
   </div>
 
-  <EditFixPoint v-if="edit" @quit="edit = null" v-model:text="edit.text" ref="dom" />
+  <EditFixPoint
+    v-if="edit"
+    @quit="edit = null"
+    v-model:text="edit.text"
+    ref="dom"
+    :key="edit.id"
+  />
 </template>
 
 <script setup lang="ts">
@@ -35,6 +41,12 @@ import ActionMenus from "@/components/group-button/index.vue";
 import EditFixPoint from "@/components/edit-fix-point/index.vue";
 
 const edit = ref<FixPoint>();
+watchEffect(() => {
+  if (edit.value !== customMap.activeFixPoint) {
+    edit.value = null;
+  }
+});
+
 const activeActionMenus = [
   {
     key: "edit",
@@ -45,6 +57,8 @@ const activeActionMenus = [
     onClick() {
       edit.value =
         edit.value === customMap.activeFixPoint ? null : customMap.activeFixPoint;
+
+      console.log(edit.value);
     },
   },
   {

二进制
src/views/scene/covers/icon/loading.zip