Skip to content

Commit

Permalink
draw top actors with lines first followed by messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ad1992 committed Nov 9, 2023
1 parent 396ea3c commit 01bbcc5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/mermaid/src/diagrams/sequence/sequenceRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,11 @@ export const draw = function (_text: string, id: string, _version: string, diagO
bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);
}

log.debug('createdActors', createdActors);
log.debug('destroyedActors', destroyedActors);

drawActors(diagram, actors, actorKeys, false);

// Draw the messages/signals
let sequenceIndex = 1;
let sequenceIndexStep = 1;
Expand Down Expand Up @@ -1028,14 +1033,12 @@ export const draw = function (_text: string, id: string, _version: string, diagO
}
});

log.debug('createdActors', createdActors);
log.debug('destroyedActors', destroyedActors);

drawActors(diagram, actors, actorKeys, false);
messagesToDraw.forEach((e) => drawMessage(diagram, e.messageModel, e.lineStartY, diagObj));

if (conf.mirrorActors) {
drawActors(diagram, actors, actorKeys, true);
}

backgrounds.forEach((e) => svgDraw.drawBackgroundRect(diagram, e));
fixLifeLineHeights(diagram, actors, actorKeys, conf);

Expand Down

0 comments on commit 01bbcc5

Please sign in to comment.