xushiting 2 年之前
父節點
當前提交
237a3f9ca3
共有 2 個文件被更改,包括 10 次插入8 次删除
  1. 2 0
      src/graphic/ListenLayer.js
  2. 8 8
      src/graphic/Renderer/Draw.js

+ 2 - 0
src/graphic/ListenLayer.js

@@ -488,6 +488,8 @@ export default class ListenLayer {
     if (joinInfo.distance != null) {
       console.log("离曲线距离:" + joinInfo.distance);
       //position到joinInfo.position的线段
+      //draw.clear();
+      draw.drawTestLine(position, joinInfo.position);
     }
     return joinInfo;
   }

+ 8 - 8
src/graphic/Renderer/Draw.js

@@ -975,14 +975,14 @@ export default class Draw {
     this.context.lineTo(end.x, end.y);
     this.context.stroke();
 
-    this.context.beginPath();
-    this.context.arc(start.x, start.y, Constant.minAdsorbPix, 0, 2 * Math.PI);
-    if (!hit) {
-      this.context.fillStyle = "black";
-    } else {
-      this.context.fillStyle = "red";
-    }
-    this.context.fill();
+    // this.context.beginPath();
+    // this.context.arc(start.x, start.y, Constant.minAdsorbPix, 0, 2 * Math.PI);
+    // if (!hit) {
+    //   this.context.fillStyle = "black";
+    // } else {
+    //   this.context.fillStyle = "red";
+    // }
+    // this.context.fill();
 
     this.context.restore();
   }