mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 15:30:03 +02:00
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:
@@ -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', () => {
|
it('should render long messages from an actor to the left to one to the right', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
|
@@ -415,11 +415,11 @@ const drawActorTypeActor = async function (elem, actor, conf, isFooter) {
|
|||||||
const center = actor.x + actor.width / 2;
|
const center = actor.x + actor.width / 2;
|
||||||
const centerY = actorY + 80;
|
const centerY = actorY + 80;
|
||||||
|
|
||||||
elem.lower();
|
const line = elem.append('g').lower();
|
||||||
|
|
||||||
if (!isFooter) {
|
if (!isFooter) {
|
||||||
actorCnt++;
|
actorCnt++;
|
||||||
elem
|
line
|
||||||
.append('line')
|
.append('line')
|
||||||
.attr('id', 'actor' + actorCnt)
|
.attr('id', 'actor' + actorCnt)
|
||||||
.attr('x1', center)
|
.attr('x1', center)
|
||||||
|
Reference in New Issue
Block a user