jinx vor 1 Jahr
Ursprung
Commit
2b9463f845

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
server/test/a0k4xu045_202305311600080410/attach/sceneStore


+ 12 - 12
src/graphic/Geometry/CurveRoadEdge.js

@@ -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 { curveEdgeService } from "../Service/CurveEdgeService";
 import Constant from '../Constant';
 export default class CurveRoadEdge extends Geometry {
   constructor(start, end, vectorId, parentId, points) {
@@ -18,9 +19,9 @@ export default class CurveRoadEdge extends Geometry {
     this.points = points || [];
     this.curves = [];
     this.geoType = VectorType.CurveRoadEdge;
-    // this.roadSide = null;
     this.setId(vectorId);
     this.setPositions(start, end);
+
   }
 
   setPositions(point1, point2) {
@@ -32,22 +33,21 @@ export default class CurveRoadEdge extends Geometry {
   }
 
   setPosition(position, dir) {
-    if (dir == "start") {
+    if (dir == 'start') {
       mathUtil.clonePoint(this.start, position);
-    } else if (dir == "end") {
+    } else if (dir == 'end') {
       mathUtil.clonePoint(this.end, position);
     }
   }
 
   getPosition(dir) {
-    if (dir == "start") {
+    if (dir == 'start') {
       return this.start;
-    } else if (dir == "end") {
+    } else if (dir == 'end') {
       return this.end;
     } else {
       return null;
     }
   }
-
-
+  
 }

+ 8 - 1
src/graphic/Service/RoadService.js

@@ -96,7 +96,7 @@ export default class RoadService {
     newRoad.singleRoadWidth = road.singleRoadWidth;
     newRoad.leftWidth = road.leftWidth;
     newRoad.rightWidth = road.rightWidth;
-
+ 
     let edgePoints;
     if (newRoad.way == Constant.oneWay) {
       edgePoints = mathUtil.RectangleVertex(
@@ -149,7 +149,14 @@ export default class RoadService {
     newRoad.singleRoadDrivewayCount = road.singleRoadDrivewayCount;
     newRoad.leftDrivewayCount = road.leftDrivewayCount;
     newRoad.rightDrivewayCount = road.rightDrivewayCount;
+    if(oldLeftEdge.roadSide){
+      leftEdge.initRoadSide()
+    }
+    if(oldRightEdge.roadSide){
+      rightEdge.initRoadSide()
+    }
     this.setLanes(newRoad.vectorId);
+    this.initRoadWidthTipsPos(newRoad)
     return newRoad.vectorId;
   }