fix: Sequence loop rendering

This commit is contained in:
Sidharth Vinod 2023-09-28 13:09:56 +05:30
parent ee58743a04
commit f96d351fdc
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
1 changed files with 1 additions and 2 deletions

View File

@ -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.