|
@@ -1,10 +1,11 @@
|
|
//墙的边缘线
|
|
//墙的边缘线
|
|
-import Geometry from "./Geometry.js";
|
|
|
|
-import VectorType from "../enum/VectorType.js";
|
|
|
|
-import { mathUtil } from "../Util/MathUtil.js";
|
|
|
|
-import VectorWight from "../enum/VectorWeight.js";
|
|
|
|
-import VectorStyle from "../enum/VectorStyle.js";
|
|
|
|
|
|
+import Geometry from './Geometry.js';
|
|
|
|
+import VectorType from '../enum/VectorType.js';
|
|
|
|
+import { mathUtil } from '../Util/MathUtil.js';
|
|
|
|
+import VectorWight from '../enum/VectorWeight.js';
|
|
|
|
+import VectorStyle from '../enum/VectorStyle.js';
|
|
import { dataService } from '../Service/DataService.js';
|
|
import { dataService } from '../Service/DataService.js';
|
|
|
|
+import { curveEdgeService } from "../Service/CurveEdgeService";
|
|
import Constant from '../Constant';
|
|
import Constant from '../Constant';
|
|
export default class CurveRoadEdge extends Geometry {
|
|
export default class CurveRoadEdge extends Geometry {
|
|
constructor(start, end, vectorId, parentId, points) {
|
|
constructor(start, end, vectorId, parentId, points) {
|
|
@@ -18,9 +19,9 @@ export default class CurveRoadEdge extends Geometry {
|
|
this.points = points || [];
|
|
this.points = points || [];
|
|
this.curves = [];
|
|
this.curves = [];
|
|
this.geoType = VectorType.CurveRoadEdge;
|
|
this.geoType = VectorType.CurveRoadEdge;
|
|
- // this.roadSide = null;
|
|
|
|
this.setId(vectorId);
|
|
this.setId(vectorId);
|
|
this.setPositions(start, end);
|
|
this.setPositions(start, end);
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
setPositions(point1, point2) {
|
|
setPositions(point1, point2) {
|
|
@@ -32,22 +33,21 @@ export default class CurveRoadEdge extends Geometry {
|
|
}
|
|
}
|
|
|
|
|
|
setPosition(position, dir) {
|
|
setPosition(position, dir) {
|
|
- if (dir == "start") {
|
|
|
|
|
|
+ if (dir == 'start') {
|
|
mathUtil.clonePoint(this.start, position);
|
|
mathUtil.clonePoint(this.start, position);
|
|
- } else if (dir == "end") {
|
|
|
|
|
|
+ } else if (dir == 'end') {
|
|
mathUtil.clonePoint(this.end, position);
|
|
mathUtil.clonePoint(this.end, position);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
getPosition(dir) {
|
|
getPosition(dir) {
|
|
- if (dir == "start") {
|
|
|
|
|
|
+ if (dir == 'start') {
|
|
return this.start;
|
|
return this.start;
|
|
- } else if (dir == "end") {
|
|
|
|
|
|
+ } else if (dir == 'end') {
|
|
return this.end;
|
|
return this.end;
|
|
} else {
|
|
} else {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|