12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import VectorType from "../enum/VectorType.js";
- import VectorCategory from "../enum/VectorCategory.js";
- import Geometry from "./Geometry";
- import Settings from "../Settings";
- export default class Point extends Geometry {
- constructor(position, vectorId) {
- super();
- this.x = null;
- this.y = null;
- this.parent = {};
- this.linkedBasePointId = null; //关联基准点
- this.locationMode = null; //如果该点是待测点,采用的定位法是哪种
- this.linkedTextId = null; //固定点,关联文本
- this.category = Settings.selectPointCategory;
- this.geoType = VectorType.Point;
- this.setId(vectorId);
- this.setPosition(position);
- }
- setPosition(position) {
- this.x = position.x;
- this.y = position.y;
- }
- getLinkedBasePointId() {
- return this.linkedBasePointId;
- }
- setLinkedBasePointId(pointId) {
- this.linkedBasePointId = pointId;
- }
- //基准点:BasePoint
- setCategory(value) {
- if (!value) {
- this.category = Settings.selectPointCategory;
- } else {
- this.category = value;
- }
- }
- }
|