We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Sometime, when I write very long sequence diagram, export image or svg always have big blank space on top/bottom image/svg.
image
svg
I don't want this.
To Reproduce Steps to reproduce the behavior:
Expected behavior Not have blank space on top/bottom of image/svg
Screenshots
Desktop (please complete the following information):
Suggest solution When using inspector I found that
SVG element on DOM have large height: 3637
So when export, export function using this height https://github.com/mermaid-js/mermaid-live-editor/blob/18a83a807a6ace0cda4d6d3f6008b7c9d87ea3d0/src/lib/components/actions.svelte#L26-L29
If svg element not have this attribute => export function will re-calculate and using fitable height.
export function
See, so new code maybe:
const svg: HTMLElement = document.querySelector('#container svg'); svg.removeAttribute('height'); const box: DOMRect = svg.getBoundingClientRect(); canvas.width = box.width; canvas.height = box.height;
The text was updated successfully, but these errors were encountered:
Had some discussions in mermaid-js/mermaid-live-editor#567
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Sometime, when I write very long sequence diagram, export
image
orsvg
always have big blank space on top/bottom image/svg.I don't want this.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Not have blank space on top/bottom of image/svg
Screenshots
Desktop (please complete the following information):
Suggest solution
When using inspector I found that
SVG element on DOM have large height: 3637
So when export, export function using this height
https://github.com/mermaid-js/mermaid-live-editor/blob/18a83a807a6ace0cda4d6d3f6008b7c9d87ea3d0/src/lib/components/actions.svelte#L26-L29
If svg element not have this attribute =>
export function
will re-calculate and using fitable height.See, so new code maybe:
The text was updated successfully, but these errors were encountered: