Browse Source

fix: 绘制旋转点

bill 2 days ago
parent
commit
5980a4d02b
2 changed files with 8 additions and 6 deletions
  1. 1 0
      src/graphic/Geometry/SVG.js
  2. 7 6
      src/graphic/Renderer/Draw.js

+ 1 - 0
src/graphic/Geometry/SVG.js

@@ -123,6 +123,7 @@ export default class SVG extends Geometry {
       x: Math.cos(this.angle + Math.PI / 2),
       y: Math.sin(this.angle + Math.PI / 2),
     };
+    console.log(this.angle);
     const p = {
       x: this.center.x + v.x * len,
       y: this.center.y + v.y * len,

+ 7 - 6
src/graphic/Renderer/Draw.js

@@ -1506,12 +1506,13 @@ export default class Draw {
         y: center.y + v.y * len,
       };
 
-      this.drawPoint({
-        ...p,
-        fillColor: "#fff",
-        color: style.strokeStyle,
-        radius: 5,
-      });
+      vector.controlAnglePoint &&
+        this.drawPoint({
+          ...vector.controlAnglePoint,
+          fillColor: "#fff",
+          color: style.strokeStyle,
+          radius: 5,
+        });
     }
   }