|
@@ -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 {
|
|
export default class Text extends Geometry {
|
|
constructor(center, vectorId) {
|
|
constructor(center, vectorId) {
|
|
super();
|
|
super();
|
|
this.center = center;
|
|
this.center = center;
|
|
- this.value = "文本";
|
|
|
|
|
|
+ this.value = '文本';
|
|
this.angle = 0;
|
|
this.angle = 0;
|
|
this.color = Style.Text.fillStyle;
|
|
this.color = Style.Text.fillStyle;
|
|
this.fontSize = Style.Text.fontSize;
|
|
this.fontSize = Style.Text.fontSize;
|
|
this.geoType = VectorType.Text;
|
|
this.geoType = VectorType.Text;
|
|
|
|
+ this.displayPoint = false;
|
|
this.setId(vectorId);
|
|
this.setId(vectorId);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -25,6 +26,9 @@ export default class Text extends Geometry {
|
|
setAngle(angle) {
|
|
setAngle(angle) {
|
|
this.angle = angle;
|
|
this.angle = angle;
|
|
}
|
|
}
|
|
|
|
+ setDisplayPoint(displayPoint) {
|
|
|
|
+ this.displayPoint = displayPoint;
|
|
|
|
+ }
|
|
|
|
|
|
setValue(value) {
|
|
setValue(value) {
|
|
this.value = value;
|
|
this.value = value;
|