From 04f8c294c23bb1f56023462326ced33494bd70b7 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Tue, 18 Feb 2025 18:50:24 -0800 Subject: [PATCH] Fix mermaid width --- webview-ui/src/components/common/MermaidBlock.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webview-ui/src/components/common/MermaidBlock.tsx b/webview-ui/src/components/common/MermaidBlock.tsx index 926725ef17..35c725b267 100644 --- a/webview-ui/src/components/common/MermaidBlock.tsx +++ b/webview-ui/src/components/common/MermaidBlock.tsx @@ -114,8 +114,8 @@ async function svgToPng(svgEl: SVGElement): Promise { // Calculate the scale factor to fit editor width while maintaining aspect ratio // Unless we can find a way to get the actual editor window dimensions through the VS Code API (which might be possible but would require changes to the extension side), - // the fixed 1200px width seems like a reliable approach. - const editorWidth = 1200 + // the fixed width seems like a reliable approach. + const editorWidth = 3_600 const scale = editorWidth / originalWidth const scaledHeight = originalHeight * scale