-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
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
Text is cut off in SVG exported from live editor #790
Comments
I'm running into this same issue currently |
I also run into this same issue when using the library in a web application, where config is |
In some cases text is cropped even in the live editor, see a very basic example here Exporting to SVG makes the issue more pronounced. |
I was able to address this issue when using the CLI to generate PNG by adding CSS to the parent element for
It doesn't seem to be working for SVG, but it might be a similar issue. Edit: If you add this to the config, it should fix the label width:
|
To add to this, in the SVG every class is marked with an ID, which is noted at the top, e.g. #mermaid-1556643060555 .label foreignObject {
font-size: 90%;
overflow: visible;
} I stumbled across this issue trying to figure out why my SVG's were coming out poor, but I've only been using mermaid for a day lol. Hopefully this helps others, and eventually helps to fix it in the editor/mermaid itself. I don't know about using this via CLI. Still working on getting the CLI working for me at all lol. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Well, it's not stale! ;-) We dig the library. Great work on it! |
Relavent MermaidJS issues: - Fix clipping - mermaidjs/mermaid.cli#59 - Fix CLI not working - mermaid-js/mermaid#790 (comment) Signed-off-by: John Andersen <john.s.andersen@intel.com>
Note that right now the project has a lot more requests piled up than it can handle. |
This issue seems to be solved in mermaid 8.4.4 as the svg download of the new live editor does not show the problem anymore: |
confirmed! great, thanks a lot. closing this issue. |
The following Mermaid markup generates this live view:
(Config is
{}
.)However, in the exported SVG all text boxes are cropped on the right side:
Am I missing something?
The text was updated successfully, but these errors were encountered: