xushiting 2 éve
szülő
commit
237a3f9ca3
2 módosított fájl, 10 hozzáadás és 8 törlés
  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();
   }