Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actor type in sequence diagram has wrong ordering #5525

Open
emmachase opened this issue May 16, 2024 · 0 comments
Open

Actor type in sequence diagram has wrong ordering #5525

emmachase opened this issue May 16, 2024 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@emmachase
Copy link

Description

When using the actor participant type, z-ordering is incorrect, showing the line above other elements like notes.

Steps to reproduce

  1. Create a sequence diagram that uses an actor
  2. Add a note over the actor
  3. Observe that the note's box and text are ordered underneath the actor line/lifetime

https://develop.git.mermaid.live/edit#pako:eNpdkD0OwjAMha9ieWEpF4hEJX4GmFmzmMS0EUlc0hQJIe5OKEVUeHLee5-d5IFGLKPCnq8DR8M7R02ioCOUIpMlwdo7w3NhI6fPsaOUnXEdxQzblpJ3U25ElnVdkgr27keUpsijPRqz2VEyg9x4WljBCK--BdKWCPc_5R-bbqDgsAhA3kMjYrHCwCmQs-WRjzeiMbccWKMqraV00ajjs-RoyHK8R4Mqp4ErHDpL-fshqM7ke36-AL2pYU4

Screenshots

SCR-20240516-koft

Code Sample

sequenceDiagram
    actor Alice
    actor Bob
    participant Charlie
    Alice->>Bob: Hi Bob
    Bob->>Alice: Hi Alice
    note over Alice, Bob: ========= oh noes =========
    note over Charlie: I'm all good

Setup

  • Mermaid version: v11.0.0-alpha.7+7bcba29
  • Browser and Version: Reproduced in Chrome and Firefox, haven't tested any other browsers, likely not browser dependent.

Suggested Solutions

I'm not super familiar with how the svg code works, but from an initial glace it seems suspicious that this line calls lower directly on elem

This is opposed to how it works in the participant function, in which a g is created first to contain the elements:

const boxplusLineGroup = elem.append('g').lower();

Additional Context

No response

@emmachase emmachase added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant