bill 2 years ago
parent
commit
ac391be587

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

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

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

@@ -23,7 +23,13 @@
     />
     />
   </div>
   </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>
 </template>
 
 
 <script setup lang="ts">
 <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";
 import EditFixPoint from "@/components/edit-fix-point/index.vue";
 
 
 const edit = ref<FixPoint>();
 const edit = ref<FixPoint>();
+watchEffect(() => {
+  if (edit.value !== customMap.activeFixPoint) {
+    edit.value = null;
+  }
+});
+
 const activeActionMenus = [
 const activeActionMenus = [
   {
   {
     key: "edit",
     key: "edit",
@@ -45,6 +57,8 @@ const activeActionMenus = [
     onClick() {
     onClick() {
       edit.value =
       edit.value =
         edit.value === customMap.activeFixPoint ? null : customMap.activeFixPoint;
         edit.value === customMap.activeFixPoint ? null : customMap.activeFixPoint;
+
+      console.log(edit.value);
     },
     },
   },
   },
   {
   {

BIN
src/views/scene/covers/icon/loading.zip