|
@@ -13,14 +13,13 @@ import { listenLayer } from "../ListenLayer";
|
|
|
|
|
|
export default class AddPoint {
|
|
export default class AddPoint {
|
|
constructor() {
|
|
constructor() {
|
|
- this.basePointIds = []; //所有基准点
|
|
|
|
this.testPointIds = []; //所有待测点
|
|
this.testPointIds = []; //所有待测点
|
|
}
|
|
}
|
|
|
|
|
|
buildPoint(position) {
|
|
buildPoint(position) {
|
|
const newPoint = pointService.create(position);
|
|
const newPoint = pointService.create(position);
|
|
if (newPoint.getCategory() == VectorCategory.Point.BasePoint) {
|
|
if (newPoint.getCategory() == VectorCategory.Point.BasePoint) {
|
|
- this.basePointIds.push(newPoint.vectorId);
|
|
|
|
|
|
+ Settings.selectBasePointId = newPoint.vectorId;
|
|
} else {
|
|
} else {
|
|
if (Settings.locationMode == Constant.angleLocationMode) {
|
|
if (Settings.locationMode == Constant.angleLocationMode) {
|
|
this.setLocationByAngle(newPoint.vectorId);
|
|
this.setLocationByAngle(newPoint.vectorId);
|
|
@@ -38,9 +37,8 @@ export default class AddPoint {
|
|
}
|
|
}
|
|
|
|
|
|
isFocusBasePoint() {
|
|
isFocusBasePoint() {
|
|
- let focusItem = stateService.getFocusItem();
|
|
|
|
- if (focusItem && focusItem.type == VectorType.Point) {
|
|
|
|
- let point = dataService.getPoint(focusItem.vectorId);
|
|
|
|
|
|
+ if (Settings.selectBasePointId) {
|
|
|
|
+ let point = dataService.getPoint(Settings.selectBasePointId);
|
|
if (point.getCategory() == VectorCategory.Point.BasePoint) {
|
|
if (point.getCategory() == VectorCategory.Point.BasePoint) {
|
|
return point;
|
|
return point;
|
|
}
|
|
}
|