jinx 2 년 전
부모
커밋
1be85da5aa
4개의 변경된 파일15개의 추가작업 그리고 9개의 파일을 삭제
  1. 1 1
      server/test/a0k4xu045_202305311600080410/attach/sceneStore
  2. 11 7
      src/graphic/Geometry/Text.js
  3. 1 0
      src/graphic/Load.js
  4. 2 1
      src/graphic/Renderer/Draw.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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) {