瀏覽代碼

修复bug

xushiting 2 年之前
父節點
當前提交
adb4b5be55
共有 1 個文件被更改,包括 9 次插入7 次删除
  1. 9 7
      src/graphic/ListenLayer.js

+ 9 - 7
src/graphic/ListenLayer.js

@@ -801,13 +801,15 @@ export default class ListenLayer {
         }
         curveRoadInfo.dir = "left";
       } else {
-        curveRoadInfo = {
-          curveRoadId: curveRoadId,
-          type: VectorType.CurveRoad,
-          distance: joinInfo.distance,
-          x: joinInfo.position.x,
-          y: joinInfo.position.y,
-        };
+        if (joinInfo.distance < curveRoad.rightWidth) {
+          curveRoadInfo = {
+            curveRoadId: curveRoadId,
+            type: VectorType.CurveRoad,
+            distance: joinInfo.distance,
+            x: joinInfo.position.x,
+            y: joinInfo.position.y,
+          };
+        }
         curveRoadInfo.dir = "right";
       }