xushiting 2 năm trước cách đây
mục cha
commit
d2e1d40a8e
1 tập tin đã thay đổi với 7 bổ sung7 xóa
  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 = {