-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
Type: Bug / ErrorSomething isn't working or is incorrectSomething isn't working or is incorrect
Description
Describe the bug
Since 9.1.7, it seems that the SVG that mermaid.mermaidAPI.render
no longer produces a height
attribute on the <svg>
root node. Having a known height
is important for page layout for example when rendering into a <iframe>
which generally requires a height.
Opening SVG Tag in 9.1.6:
<svg viewBox="0 0 124.61666870117188 236" style="max-width: 124.61666870117188px;" height="236" aria-labelledby="chart-title-mermaid chart-desc-mermaid" role="img" xmlns="http://www.w3.org/2000/svg" width="100%" id="mermaid">
Opening SVG Tag in 9.1.7:
<svg viewBox="0 0 124.61666870117188 236" style="max-width: 124.61666870117188px;" aria-labelledby="chart-title-mermaid chart-desc-mermaid" role="img" xmlns="http://www.w3.org/2000/svg" width="100%" id="mermaid">
To Reproduce
Render this source using mermaid.mermaidAPI.render("mermaid", source, callback)
:
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
Expected behavior
The height
attribute to be present.
I think it may have regressed in https://github.com/mermaid-js/mermaid/pull/3364/files#diff-3274f1a37032fb0ae4e2823def0007c634e869ae0dfc304ff6a12c36513c3a52.
Metadata
Metadata
Assignees
Labels
Type: Bug / ErrorSomething isn't working or is incorrectSomething isn't working or is incorrect