We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58e9cf8 commit ed1cfafCopy full SHA for ed1cfaf
src/render/drawTree.ts
@@ -104,13 +104,19 @@ function connectNodesEdge(canvasEle: HTMLCanvasElement | null, xCord: {xStart: n
104
const start = { x: xStart, y: yStart };
105
const end = { x: xEnd, y: yEnd };
106
107
+ const xHalf = (xStart + xEnd)/2;
108
+ const yHalf = (yStart + yEnd)/2;
109
+
110
+ const cp1 = { x: xHalf, y: yHalf };
111
+ const cp2 = { x: xEnd, y: yHalf };
112
113
const context = canvasEle?.getContext("2d");
114
context?.beginPath();
115
(context as CanvasRenderingContext2D).strokeStyle = "#6a00f4";
116
(context as CanvasRenderingContext2D).lineWidth = 2;
117
context?.moveTo(start.x, start.y);
- context?.lineTo(end.x, end.y);
118
+ context?.bezierCurveTo(cp1.x, cp1.y, cp2.x, cp2.y, end.x, end.y);
119
+ // context?.lineTo(end.x, end.y);
120
context?.stroke();
121
}
122
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments