Browse Source

调整末端箭头大小

haojianlong 5 years ago
parent
commit
d267a7b1f9
1 changed files with 3 additions and 3 deletions
  1. 3 3
      saga-web-draw/src/SPainter.ts

+ 3 - 3
saga-web-draw/src/SPainter.ts

@@ -836,7 +836,7 @@ export class SPainter extends SObject {
      * */
     private drawDiamondArrow(line: SLine, isEnd: boolean = true): void {
         // 定义箭头长度
-        const d = 5;
+        const d = 2;
         // 箭头横坐标
         const x1 = d * Math.cos(Math.PI / 4);
         // 箭头纵坐标
@@ -878,7 +878,7 @@ export class SPainter extends SObject {
      * */
     private drawSquareArrow(line: SLine, isEnd: boolean = true): void {
         // 定义箭头长度
-        const d = 5;
+        const d = 2;
         // 线段与x轴夹角
         const fo = Math.atan(line.dy / line.dx);
         const ang = line.dx >= 0 ? fo : fo + Math.PI;
@@ -916,7 +916,7 @@ export class SPainter extends SObject {
      * */
     private drawCircleArrow(line: SLine, isEnd: boolean = true): void {
         // 定义箭头长度
-        const d = 5;
+        const d = 2;
         // 线段与x轴夹角
         const fo = Math.atan(line.dy / line.dx);
         const ang = line.dx >= 0 ? fo : fo + Math.PI;