fix: Mermaid fullscreen — fill viewport instead of showing tiny centered diagram
This commit is contained in:
@@ -205,10 +205,6 @@ function openFullscreen(svgWrapper) {
|
|||||||
content.innerHTML = svgWrapper.innerHTML;
|
content.innerHTML = svgWrapper.innerHTML;
|
||||||
var svg = content.querySelector('svg');
|
var svg = content.querySelector('svg');
|
||||||
if (svg) {
|
if (svg) {
|
||||||
svg.style.width = '100%';
|
|
||||||
svg.style.height = '100%';
|
|
||||||
svg.style.maxWidth = '95vw';
|
|
||||||
svg.style.maxHeight = '95vh';
|
|
||||||
svg.style.cursor = 'default';
|
svg.style.cursor = 'default';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-1
@@ -7676,7 +7676,14 @@ body.popup-mode .content-area {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
.mermaid-fullscreen-close:hover { background: rgba(255,255,255,0.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 {
|
.mermaid-focus-panel {
|
||||||
position: fixed; top: 0; right: 0; bottom: 0; width: 480px;
|
position: fixed; top: 0; right: 0; bottom: 0; width: 480px;
|
||||||
|
|||||||
Reference in New Issue
Block a user