|
@@ -91,7 +91,11 @@ export default class PointService {
|
|
let points = dataService.getPoints();
|
|
let points = dataService.getPoints();
|
|
let needDeletePointIds = [];
|
|
let needDeletePointIds = [];
|
|
for (let key in points) {
|
|
for (let key in points) {
|
|
|
|
+
|
|
let point = dataService.getPoint(key);
|
|
let point = dataService.getPoint(key);
|
|
|
|
+ if(point.getCategory() == VectorCategory.Point.BasePoint){
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
if (point.vectorId == testPointId) {
|
|
if (point.vectorId == testPointId) {
|
|
needDeletePointIds.push(testPointId);
|
|
needDeletePointIds.push(testPointId);
|
|
} else if (point.linkedTestPointId == testPointId) {
|
|
} else if (point.linkedTestPointId == testPointId) {
|
|
@@ -101,15 +105,17 @@ export default class PointService {
|
|
let lines = dataService.getLines();
|
|
let lines = dataService.getLines();
|
|
for (let key in lines) {
|
|
for (let key in lines) {
|
|
let line = dataService.getLine(key);
|
|
let line = dataService.getLine(key);
|
|
|
|
+ let startPoint = dataService.getPoint(line.startId);
|
|
|
|
+ let endPoint = dataService.getPoint(line.endId);
|
|
if (
|
|
if (
|
|
needDeletePointIds.indexOf(line.startId) > -1 ||
|
|
needDeletePointIds.indexOf(line.startId) > -1 ||
|
|
needDeletePointIds.indexOf(line.endId) > -1
|
|
needDeletePointIds.indexOf(line.endId) > -1
|
|
) {
|
|
) {
|
|
dataService.deleteLine(key);
|
|
dataService.deleteLine(key);
|
|
- if (needDeletePointIds.indexOf(line.startId) > -1) {
|
|
|
|
|
|
+ if (needDeletePointIds.indexOf(line.startId) > -1&& endPoint.getCategory()!= VectorCategory.Point.BasePoint) {
|
|
this.deleteTestPoint(line.endId);
|
|
this.deleteTestPoint(line.endId);
|
|
}
|
|
}
|
|
- if (needDeletePointIds.indexOf(line.endId) > -1) {
|
|
|
|
|
|
+ if (needDeletePointIds.indexOf(line.endId) > -1 && startPoint.getCategory()!= VectorCategory.Point.BasePoint) {
|
|
this.deleteTestPoint(line.startId);
|
|
this.deleteTestPoint(line.startId);
|
|
}
|
|
}
|
|
}
|
|
}
|