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

+ 7 - 7
src/graphic/ListenLayer.js

@@ -255,7 +255,7 @@ export default class ListenLayer {
       const distance = mathUtil.getDistance(position, join);
       let width = road.rightWidth;
       //逆时针的时候,position在左区域
-      if (distance > 1 && mathUtil.isClockwise(startPoint, join, position)) {
+      if (distance > 1 && mathUtil.isClockwise([startPoint, join, position])) {
         width = road.leftWidth;
       }
       if (
@@ -312,17 +312,17 @@ export default class ListenLayer {
         Math.max(curveRoad.leftWidth, curveRoad.rightWidth)
       );
       if (
-        (mathUtil.isClockwise(
+        (mathUtil.isClockwise([
           curveRoad.points[0],
           joinInfo.position,
-          position
-        ) &&
+          position,
+        ]) &&
           joinInfo.distance < curveRoad.leftWidth) ||
-        (mathUtil.isClockwise(
+        (mathUtil.isClockwise([
           curveRoad.points[curveRoad.points.length - 1],
           joinInfo.position,
-          position
-        ) &&
+          position,
+        ]) &&
           joinInfo.distance < curveRoad.rightWidth)
       ) {
         curveRoadInfo = {