Correccted bug with innen height in composite diags

This commit is contained in:
Per Brolin
2024-06-12 08:49:58 +02:00
parent 979a9b08f9
commit 6842b316ec
2 changed files with 18 additions and 8 deletions

View File

@@ -89,6 +89,19 @@ stateDiagram-v2
</pre
>
<pre id="diagram" class="mermaid2">
stateDiagram
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
</pre>
<pre id="diagram" class="mermaid">
stateDiagram
direction LR
@@ -100,11 +113,7 @@ stateDiagram-v2
a --> b
}
B --> D
</pre
>
</pre>
<script type="module">
import mermaid from './mermaid.esm.mjs';
@@ -122,15 +131,16 @@ stateDiagram-v2
// layout: 'elk',
flowchart: { titleTopMargin: 10 },
// fontFamily: 'Caveat',
// fontFamily: 'Kalam',
//fontFamily: 'Kalam',
fontFamily: 'Arial',
sequence: {
actorFontFamily: 'arial',
noteFontFamily: 'arial',
messageFontFamily: 'arial',
},
fontSize: 12,
fontSize: 10,
logLevel: 0,
htmlLabels: true,
});
function callback() {
alert('It worked');

View File

@@ -215,7 +215,7 @@ const roundedWithTitle = (parent, node) => {
const y = node.y - node.height / 2 - halfPadding;
const innerY = node.y - node.height / 2 - halfPadding + bbox.height + 2;
const height = node.height + padding;
const innerHeight = node.height + padding - bbox.height - 2;
const innerHeight = node.height + padding - bbox.height - 6;
const look = siteConfig.look;
// add the rect