mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-23 10:16:43 +02:00
fix: render the participants in same order as they are created
This commit is contained in:
@@ -164,6 +164,13 @@
|
|||||||
end
|
end
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<pre class="mermaid">
|
||||||
|
sequenceDiagram
|
||||||
|
actor Alice
|
||||||
|
actor John
|
||||||
|
Alice-xJohn: Hello John, how are you?
|
||||||
|
John--xAlice: Great!
|
||||||
|
</pre>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import mermaid from './mermaid.esm.mjs';
|
import mermaid from './mermaid.esm.mjs';
|
||||||
mermaid.initialize({
|
mermaid.initialize({
|
||||||
@@ -174,7 +181,7 @@
|
|||||||
flowchart: { curve: 'basis' },
|
flowchart: { curve: 'basis' },
|
||||||
gantt: { axisFormat: '%m/%d/%Y' },
|
gantt: { axisFormat: '%m/%d/%Y' },
|
||||||
sequence: { actorMargin: 50 },
|
sequence: { actorMargin: 50 },
|
||||||
// sequenceDiagram: { actorMargin: 300 } // deprecated
|
sequenceDiagram: { actorMargin: 300 }, // deprecated
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
@@ -324,7 +324,7 @@ const drawActorTypeParticipant = function (elem, actor, conf, isFooter) {
|
|||||||
const center = actor.x + actor.width / 2;
|
const center = actor.x + actor.width / 2;
|
||||||
const centerY = actorY + 5;
|
const centerY = actorY + 5;
|
||||||
|
|
||||||
const boxpluslineGroup = elem.append('g').lower();
|
const boxpluslineGroup = elem.append('g').raise();
|
||||||
var g = boxpluslineGroup;
|
var g = boxpluslineGroup;
|
||||||
|
|
||||||
if (!isFooter) {
|
if (!isFooter) {
|
||||||
@@ -1038,6 +1038,7 @@ export default {
|
|||||||
drawText,
|
drawText,
|
||||||
drawLabel,
|
drawLabel,
|
||||||
drawActor,
|
drawActor,
|
||||||
|
drawActorTypeParticipant,
|
||||||
drawBox,
|
drawBox,
|
||||||
drawPopup,
|
drawPopup,
|
||||||
anchorElement,
|
anchorElement,
|
||||||
|
Reference in New Issue
Block a user