suport dynamic resizing of rect shape

This commit is contained in:
Ashish Jain
2024-09-27 10:24:29 +02:00
parent 7a9ec739d9
commit b99e080337
3 changed files with 37 additions and 12 deletions

View File

@@ -48,15 +48,15 @@
};
mermaid.initialize({
startOnLoad: false,
// look: 'handdrawn',
//look: 'handdrawn',
layout: 'fixed',
theme: 'neo-dark',
// layout: 'elk',
//layout: 'elk',
fontFamily: 'Kalam',
logLevel: 1,
});
let shape = 'pill';
let shape = 'rect';
let code = `
flowchart TB
@@ -65,7 +65,9 @@
n81@{ shape: '${shape}'}
n82@{ shape: '${shape}'}
n83@{ label: "A single line of text", shape: '${shape}'}
`;
n80["APA ksldj hfaskljdh aklsjdhf klasjdhf klasjhf klsajdh klasjdhf klasjdhf klasjdh klasjhf klasjdh klajsdhfklasjdhf kljadh fklasjdhf klajsdhf lkasdhf klajsdhf klasjdhfklasjdh klasjhf klasdfh klasdfh aklsjfh akjshkasldfh klasdfh klasjh fklsjhf klasdhf kljasdhf klasdhf klj"]
n84@{ shape: '${shape}'}
`;
let positions = {
edges: {},
@@ -76,6 +78,12 @@
width: 300,
height: 200,
},
n80: {
x: -400,
y: 10,
width: 100,
height: 50,
},
n82: {
x: 400,
y: 10,
@@ -86,6 +94,12 @@
x: 800,
y: 10,
},
n84: {
x: 1200,
y: 10,
width: 300,
height: 200,
},
},
};