|
@@ -365,6 +365,18 @@ export default defineComponent({
|
|
|
console.log("不在有效宽度内,轨迹不生效");
|
|
|
return;
|
|
|
}
|
|
|
+ if (
|
|
|
+ item.trackList.some((t) => {
|
|
|
+ return (
|
|
|
+ Math.pow(Math.abs(t.offsetX - track.offsetX), 2) +
|
|
|
+ Math.pow(Math.abs(t.offsetY - track.offsetY), 2) <
|
|
|
+ 500
|
|
|
+ );
|
|
|
+ })
|
|
|
+ ) {
|
|
|
+ console.log("两个轨迹相距过近");
|
|
|
+ return;
|
|
|
+ }
|
|
|
// 是否保留当前的轨迹分
|
|
|
const ifKeepScore =
|
|
|
Math.round(
|