Merge pull request #5564 from Ronid1/bug/5525_sequence_diagram_fix_note_z_position

Bug/5525 sequence diagram fix note z position
This commit is contained in:
Sidharth Vinod
2024-06-20 13:51:21 +00:00
committed by GitHub
2 changed files with 14 additions and 2 deletions

View File

@@ -464,6 +464,18 @@ context('Sequence diagram', () => {
{}
);
});
it('should render notes over actors and participant', () => {
imgSnapshotTest(
`
sequenceDiagram
actor Alice
participant Charlie
note over Alice: some note
note over Charlie: other note
`,
{}
);
});
it('should render long messages from an actor to the left to one to the right', () => {
imgSnapshotTest(
`

View File

@@ -415,11 +415,11 @@ const drawActorTypeActor = async function (elem, actor, conf, isFooter) {
const center = actor.x + actor.width / 2;
const centerY = actorY + 80;
elem.lower();
const line = elem.append('g').lower();
if (!isFooter) {
actorCnt++;
elem
line
.append('line')
.attr('id', 'actor' + actorCnt)
.attr('x1', center)