We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dd5c0d commit 20f8d1eCopy full SHA for 20f8d1e
MermaidEditor/LivePreview/index.html
@@ -51,7 +51,7 @@
51
}
52
#mermaidGraph {
53
height: 100vh;
54
- max-height: 100vh;
+ /* max-height: 100vh;*/
55
overflow: auto;
56
57
@@ -200,6 +200,18 @@
200
canvas.width = width ?? svgElem.clientWidth;
201
canvas.height = height ?? svgElem.clientHeight;
202
203
+ const myGraph = document.querySelector("#mermaidGraph");
204
+ if (width > 666 || height > 666)
205
+ {
206
+ myGraph.style.width = canvas.width + "px";
207
+ myGraph.style.height = canvas.height + "px";
208
+ }
209
+ else
210
211
+ myGraph.style.width = null;
212
+ myGraph.style.height = null;
213
214
+
215
await drawInlineSVG(svgElem, ctx);
216
var img = canvas.toDataURL("image/png");
217
console.log(img);
0 commit comments