|
@@ -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 = {
|