You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(gitGraph): correct BT orientation arc sweep flags in drawArrow()
Swap SVG arc sweep-flag values in the BT (bottom-to-top) orientation
branches of drawArrow() so curves bend in the correct direction.
Fixes both rerouting and non-rerouting code paths for merge and
non-merge arrows. Also fixes an incorrect x-coordinate in the
non-rerouting BT p1.x>p2.x non-merge case.
Resolves#6593
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: correct BT orientation arc sweep flags in gitGraph drawArrow()
6
+
7
+
Swapped SVG arc sweep-flag values in the BT (bottom-to-top) orientation branches of `drawArrow()` so curves bend in the correct direction. Affects both rerouting and non-rerouting code paths for merge and non-merge arrows.
Copy file name to clipboardExpand all lines: packages/mermaid/src/diagrams/git/gitGraphRenderer.ts
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -657,14 +657,14 @@ const drawArrow = (
657
657
// Source commit is on branch position left of destination commit
658
658
// so render arrow rightward with colour of destination branch
659
659
660
-
lineDef=`M ${p1.x}${p1.y} L ${lineX-radius}${p1.y}${arc}${lineX}${p1.y-offset} L ${lineX}${p2.y+radius}${arc2}${lineX+offset}${p2.y} L ${p2.x}${p2.y}`;
660
+
lineDef=`M ${p1.x}${p1.y} L ${lineX-radius}${p1.y}${arc2}${lineX}${p1.y-offset} L ${lineX}${p2.y+radius}${arc}${lineX+offset}${p2.y} L ${p2.x}${p2.y}`;
661
661
}else{
662
662
// Source commit is on branch position right of destination commit
663
663
// so render arrow leftward with colour of source branch
lineDef=`M ${p1.x}${p1.y} L ${lineX+radius}${p1.y}${arc2}${lineX}${p1.y-offset} L ${lineX}${p2.y+radius}${arc}${lineX-offset}${p2.y} L ${p2.x}${p2.y}`;
667
+
lineDef=`M ${p1.x}${p1.y} L ${lineX+radius}${p1.y}${arc}${lineX}${p1.y-offset} L ${lineX}${p2.y+radius}${arc2}${lineX-offset}${p2.y} L ${p2.x}${p2.y}`;
0 commit comments