Skip to content

Add viewBox attribute to SVG #104

Open
@sidharthv96

Description

@sidharthv96

Is your feature request related to a problem? Please describe.
As the SVG is lacking viewBox attribute, scaling the output is a bit tricky.

https://github.com/mermaid-js/mermaid-live-editor/blob/cba9a6754dd0a33a0073ec50167efef35289ac72/src/lib/components/View.svelte#L122-L126

Describe the solution you'd like
In addition to height and width, a viewBox property is also added.
Also, if an option to specify an ID for the generated SVG is there, that would make the post-processing easier.

Additional context
mermaid-js/mermaid-live-editor#1457

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions