fix: Potential fix for mis-sized mermaid diagrams (#12354)

closes #11874
This commit is contained in:
Tom Moor
2026-05-14 19:34:40 -04:00
committed by GitHub
parent 9db539dfce
commit 246aa83071
+2 -1
View File
@@ -168,7 +168,8 @@ class MermaidRenderer {
renderElement.style.visibility = "hidden";
renderElement.style.top = "0";
renderElement.style.left = "0";
renderElement.style.width = "100%";
const width = this.editor.view?.dom.clientWidth ?? window.innerWidth;
renderElement.style.width = `${width}px`;
renderElement.style.zIndex = "-1";
document.body.appendChild(renderElement);