mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 22:09:57 +02:00
Updated changes for b.8
This commit is contained in:
@@ -64,14 +64,43 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid">
|
||||||
sequenceDiagram
|
%%{ init: {}}%%
|
||||||
actor Alice as Alice
|
|
||||||
participant John as John
|
|
||||||
|
|
||||||
Alice ->>+ John: Hello John, how are you?
|
flowchart TB
|
||||||
Alice ->>+ John: John, can you hear me?
|
subgraph Simple
|
||||||
John -->>- Alice: Hi Alice, I can hear you!
|
subgraph Simple2
|
||||||
John -->>- Alice: I feel great!
|
A
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
subgraph Leak
|
||||||
|
B
|
||||||
|
end
|
||||||
|
|
||||||
|
B --> C
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<pre id="diagram" class="mermaid2">
|
||||||
|
%%{ init: {}}%%
|
||||||
|
|
||||||
|
sequenceDiagram
|
||||||
|
participant H as H
|
||||||
|
participant Alice as Alice
|
||||||
|
participant Bob as Bob
|
||||||
|
|
||||||
|
Alice ->> Bob: Hello Bob, how are you ?
|
||||||
|
Bob ->> Alice: Fine, thank you. And you?
|
||||||
|
create participant Carl as Carl
|
||||||
|
Alice ->> Carl: Hi Carl!
|
||||||
|
create actor D as Donald
|
||||||
|
Carl ->> D: Hi!
|
||||||
|
D ->> H: sss
|
||||||
|
destroy Carl
|
||||||
|
Alice -x Carl: We are too many
|
||||||
|
destroy Bob
|
||||||
|
Bob ->> Alice: I agree
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<pre id="diagram" class="mermaid2">
|
<pre id="diagram" class="mermaid2">
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mermaid-chart/mermaid",
|
"name": "@mermaid-chart/mermaid",
|
||||||
"version": "10.8.0-b.7",
|
"version": "10.8.0-b.8",
|
||||||
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"module": "./dist/mermaid.core.mjs",
|
"module": "./dist/mermaid.core.mjs",
|
||||||
|
@@ -15,6 +15,8 @@ const rect = (parent, node) => {
|
|||||||
const shapeSvg = parent
|
const shapeSvg = parent
|
||||||
.insert('g')
|
.insert('g')
|
||||||
.attr('class', 'cluster' + (node.class ? ' ' + node.class : ''))
|
.attr('class', 'cluster' + (node.class ? ' ' + node.class : ''))
|
||||||
|
.attr('data-et', 'cluster')
|
||||||
|
.attr('data-id', node.id)
|
||||||
.attr('id', node.id);
|
.attr('id', node.id);
|
||||||
|
|
||||||
// add the rect
|
// add the rect
|
||||||
|
@@ -300,7 +300,7 @@ const drawActorTypeParticipant = function (elem, actor, conf, isFooter) {
|
|||||||
.attr('data-et', 'life-line')
|
.attr('data-et', 'life-line')
|
||||||
.attr('data-id', actor.name)
|
.attr('data-id', actor.name)
|
||||||
.attr('x1', center)
|
.attr('x1', center)
|
||||||
.attr('y1', actor.height)
|
.attr('y1', actor.starty || 0 + actor.height)
|
||||||
.attr('x2', center)
|
.attr('x2', center)
|
||||||
.attr('y2', 2000)
|
.attr('y2', 2000)
|
||||||
.attr('class', 'actor-line')
|
.attr('class', 'actor-line')
|
||||||
|
Reference in New Issue
Block a user