Skip to content

Commit

Permalink
GitGraph: add check for direction of merge arrow to determine colour.
Browse files Browse the repository at this point in the history
  • Loading branch information
guypursey committed Oct 7, 2023
1 parent 12a4707 commit b3d1929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mermaid/src/diagrams/git/gitGraphRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ const drawArrow = (svg, commit1, commit2, allCommits) => {
radius = 10;
offset = 10;
// Figure out the color of the arrow,arrows going down take the color from the destination branch
colorClassNum = branchPos[commit2.branch].index;
colorClassNum = branchPos[(p1.y > p2.y ? commit1 : commit2).branch].index;

const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y);
const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x);
Expand Down

0 comments on commit b3d1929

Please sign in to comment.