zhangjie 1 年之前
父節點
當前提交
97c9beb54c
共有 1 個文件被更改,包括 12 次插入13 次删除
  1. 12 13
      src/features/mark/MarkBody.vue

+ 12 - 13
src/features/mark/MarkBody.vue

@@ -90,19 +90,18 @@ const makeScoreTrack = (
     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;
-  // }
+  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 questionScore =
     store.currentTask &&