Skip to content
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

Inaccurate SVG element calculations #3

Open
ginger-tek opened this issue Oct 31, 2019 · 1 comment
Open

Inaccurate SVG element calculations #3

ginger-tek opened this issue Oct 31, 2019 · 1 comment

Comments

@ginger-tek
Copy link

For some reason, the shape labels are not rendering correctly out-of-the-box with 8.4.0. The <div> inside the foreignObject elements of nodes on the graph is being cutoff. It looks like the renderer is not calculating the width of the node with consideration of the default "padding", and right side of the

element is hidden. Below is what it looks like; the label is supposed to say "Introduction", but the "n" is hidden:
image
You can see in this screenshot how the <div> is being hidden by it's encompassing parent element(s), and how the width properties differ:
image

@ginger-tek
Copy link
Author

ginger-tek commented Oct 31, 2019

Here's my code, it's quote literally very basic, which is why I say out-of-the-box:

# Graph Definition:
graph TD
p1(Introduction)
o1{{Yes}}
o2{{No}}
p1-->o1
p1-->o2

I'm using the mermaid.render() method in the API fashion, passing in the above definition string, and inserting the resulting SVG in the DOM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant