From 4a6e907f3f2a7e082c322247ac35556c849e006b Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Fri, 5 Jun 2026 08:14:54 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20Mermaid=20fullscreen=20=E2=80=94=20fill?= =?UTF-8?q?=20viewport=20instead=20of=20showing=20tiny=20centered=20diagra?= =?UTF-8?q?m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/js/mermaid-viewer.js | 4 ---- frontend/style.css | 9 ++++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/js/mermaid-viewer.js b/frontend/js/mermaid-viewer.js index a10792d..942079d 100644 --- a/frontend/js/mermaid-viewer.js +++ b/frontend/js/mermaid-viewer.js @@ -205,10 +205,6 @@ function openFullscreen(svgWrapper) { content.innerHTML = svgWrapper.innerHTML; var svg = content.querySelector('svg'); if (svg) { - svg.style.width = '100%'; - svg.style.height = '100%'; - svg.style.maxWidth = '95vw'; - svg.style.maxHeight = '95vh'; svg.style.cursor = 'default'; } diff --git a/frontend/style.css b/frontend/style.css index 12bcc9c..4c585c2 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -7676,7 +7676,14 @@ body.popup-mode .content-area { z-index: 1; } .mermaid-fullscreen-close:hover { background: rgba(255,255,255,0.1); } -.mermaid-fullscreen-content { max-width: 95vw; max-height: 95vh; } +.mermaid-fullscreen-content { + width: 95vw; height: 95vh; + display: flex; align-items: center; justify-content: center; +} +.mermaid-fullscreen-content svg { + width: 100%; height: 100%; + max-width: 100%; max-height: 100%; +} .mermaid-focus-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 480px;