Skip to content

Commit

Permalink
fix: Sequence loop rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Sep 28, 2023
1 parent ee58743 commit f96d351
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/mermaid/src/diagrams/sequence/sequenceRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1421,8 +1421,7 @@ const buildMessageModel = function (msg, actors, diagObj) {
return isArrowToRight ? -value : value;
};

// 3 is max difference for +/- 1
if (Math.abs(startx - stopx) <= 3) {
if (msg.from === msg.to) {
// This is a self reference, so we need to make sure the arrow is drawn correctly
// There are many checks in the downstream rendering that checks for equality.
// The lines on loops will be off by few pixels, but that's fine for now.
Expand Down

0 comments on commit f96d351

Please sign in to comment.