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

fix: render the participants in same order as they are created #5017

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion demos/sequence.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ <h1>Sequence diagram demos</h1>
end
</pre>

<pre class="mermaid">
sequenceDiagram
actor Alice
actor John
Alice-xJohn: Hello John, how are you?
John--xAlice: Great!
</pre>
<script type="module">
import mermaid from './mermaid.esm.mjs';
mermaid.initialize({
Expand All @@ -174,7 +181,7 @@ <h1>Sequence diagram demos</h1>
flowchart: { curve: 'basis' },
gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50 },
// sequenceDiagram: { actorMargin: 300 } // deprecated
// sequenceDiagram: { actorMargin: 300 }, // deprecated
ad1992 marked this conversation as resolved.
Show resolved Hide resolved
});
</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid/src/diagrams/sequence/svgDraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ const drawActorTypeParticipant = function (elem, actor, conf, isFooter) {
const center = actor.x + actor.width / 2;
const centerY = actorY + 5;

const boxpluslineGroup = elem.append('g').lower();
const boxpluslineGroup = elem.append('g');
var g = boxpluslineGroup;

if (!isFooter) {
Expand Down
Loading