소스 검색

Merge branch 'master' of http://192.168.0.115:3000/bill/traffic-laser

xushiting 2 년 전
부모
커밋
eb2625f303
3개의 변경된 파일14개의 추가작업 그리고 6개의 파일을 삭제
  1. 10 1
      src/graphic/Renderer/Draw.js
  2. 4 4
      src/main.ts
  3. 0 1
      src/views/graphic/geos/text.vue

+ 10 - 1
src/graphic/Renderer/Draw.js

@@ -24,6 +24,7 @@ export const help = {
       [stateService.getDraggingItem(), "Dragging"],
       [stateService.getFocusItem(), "Focus"],
     ];
+    console.log(itemsEntry);
     let currentAttr;
 
     //console.log(itemsEntry)
@@ -1162,6 +1163,14 @@ export default class Draw {
   drawText(vector) {
     this.context.save();
     const [_, foo] = help.setVectorStyle(this.context, vector);
+
+    let select = false;
+    const geo = stateService.getFocusItem();
+    if (geo) {
+      const realVector = dataService.getGeo(geo.type, geo.vectorId);
+      select = realVector && realVector.linkedTextId === vector.vectorId;
+    }
+
     this.context.fillStyle = vector.color;
     this.context.textBaseline = "bottom";
     this.context.font = `${
@@ -1173,7 +1182,7 @@ export default class Draw {
 
     this.context.fillText(vector.value, bound[3].x, bound[3].y);
 
-    if (foo) {
+    if (select || foo) {
       this.context.beginPath();
       const padding = 2 * coordinate.ratio;
       this.context.moveTo(bound[0].x - padding, bound[0].y - padding);

+ 4 - 4
src/main.ts

@@ -1,9 +1,9 @@
 import VConsole from "vconsole";
-// if (import.meta.env.MODE === "test") {
-if (!os.isPc) {
-  new VConsole();
+if (import.meta.env.MODE === "test") {
+  if (!os.isPc) {
+    new VConsole();
+  }
 }
-// }
 
 import "@/assets/theme.editor.scss";
 import "@/assets/public.scss";

+ 0 - 1
src/views/graphic/geos/text.vue

@@ -45,7 +45,6 @@ import { debounce } from "@/utils";
 import GeoActions from "@/graphic/enum/GeoActions";
 import Color from "@/components/color/index.vue";
 import VectorCategory from "@/graphic/enum/VectorCategory";
-import EditFixPoint from "@/components/edit-fix-point/index.vue";
 
 const props = defineProps<{ geo: FocusVector }>();
 const inputTextRef = ref();