jinx 2 年之前
父节点
当前提交
1be85da5aa

文件差异内容过多而无法显示
+ 1 - 1
server/test/a0k4xu045_202305311600080410/attach/sceneStore


+ 11 - 7
src/graphic/Geometry/Text.js

@@ -1,20 +1,21 @@
-import VectorType from "../enum/VectorType.js";
-import Geometry from "./Geometry.js";
-import { mathUtil } from "../Util/MathUtil.js";
-import { coordinate } from "../Coordinate.js";
-import Constant from "../Constant.js";
-import Style from "@/graphic/CanvasStyle/index.js";
+import VectorType from '../enum/VectorType.js';
+import Geometry from './Geometry.js';
+import { mathUtil } from '../Util/MathUtil.js';
+import { coordinate } from '../Coordinate.js';
+import Constant from '../Constant.js';
+import Style from '@/graphic/CanvasStyle/index.js';
 
 //不靠墙
 export default class Text extends Geometry {
   constructor(center, vectorId) {
     super();
     this.center = center;
-    this.value = "文本";
+    this.value = '文本';
     this.angle = 0;
     this.color = Style.Text.fillStyle;
     this.fontSize = Style.Text.fontSize;
     this.geoType = VectorType.Text;
+    this.displayPoint = false;
     this.setId(vectorId);
   }
 
@@ -25,6 +26,9 @@ export default class Text extends Geometry {
   setAngle(angle) {
     this.angle = angle;
   }
+  setDisplayPoint(displayPoint) {
+    this.displayPoint = displayPoint;
+  }
 
   setValue(value) {
     this.value = value;

+ 1 - 0
src/graphic/Load.js

@@ -254,6 +254,7 @@ export default class Load {
             );
             text.setValue(data3d.fixPoints[i].text);
             text.setAngle(angle);
+            text.setDisplayPoint (true);
           }
         }
       }

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

@@ -1031,7 +1031,8 @@ export default class Draw {
     );
 
     this.context.restore();
-    this.drawPoint({...vector.center, color: vector.color}, true)
+
+    vector.displayPoint && this.drawPoint({...vector.center, color: vector.color}, true)
   }
 
   drawSVG(vector) {