xushiting 2 éve
szülő
commit
46ebc337a4

+ 1 - 1
src/graphic/Service/CurveRoadService.js

@@ -28,7 +28,7 @@ export default class CurveRoadService extends RoadService {
       edgePoints = mathUtil.RectangleVertex(
         startPoint,
         endPoint,
-        road.singleRoadWidth
+        curveRoad.singleRoadWidth
       );
     } else {
       edgePoints = mathUtil.RectangleVertex(

+ 2 - 2
src/graphic/Service/RoadService.js

@@ -1190,7 +1190,7 @@ export default class RoadService {
         mathUtil.clonePoint(rightEdge.end, edgeEndPosition);
       }
 
-      let line = roadService.getMidLine(road);
+      let line = this.getMidLine(road);
       if (dir == "left") {
         let join = mathUtil.getJoinLinePoint(leftEdge.start, line);
         road.setWidth(
@@ -1316,7 +1316,7 @@ export default class RoadService {
 
     edgeService.updateEdgeForMovePoint(road.startId);
     edgeService.updateEdgeForMovePoint(road.endId);
-    roadService.setLanes(road.vectorId, dir);
+    this.setLanes(road.vectorId, dir);
   }
 
   unlock(roadId) {

+ 2 - 1
src/graphic/Setting.js

@@ -1,3 +1,4 @@
+import Constant from "./Constant";
 const Setting = {
   roadLeftDrivewayCount: 1,
   roadRightDrivewayCount: 1,
@@ -13,6 +14,6 @@ const Setting = {
   rightCurveRoadWidth: 50,
   roadMidDivideWidth: 40,
   curveRoadMidDivideWidth: 40,
-  wayType: "oneWay", //one表示单向,two表示双向
+  wayType: Constant.twoWay, //one表示单向,two表示双向
 };
 export default Setting;