-
-
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
mermaidAPI.render generated different svg code from mermaid.int() #374
Comments
I hacked the code a bit and I resolve the problem by modifying the code to var text = 'graph TD\nA-->B\nA-->C\nB-->D\nD-->A\n'
var element = document.getElementById('mermaid0')
mermaidAPI.render(element.id, text, function(svgCode){
element.innerHTML = svgCode
element.firstChild.style.height = element.getAttribute('viewbox').split(' ')[3] + 'px'
}) It seems that the original height of svg block is wrong. |
Also, mermaidAPI.render doesn't work properly with |
@shd101wyy Met this error when I use mermaidAPI.render too. Thank you for your solution |
I don't use the render method very often. I always just invoke the Let me know if there are something that |
…yarn/develop/svelte-3.42.6 chore(deps-dev): bump svelte from 3.42.5 to 3.42.6
Hi,
After I ran the code below ( I am using mermaid 6.0.0)
the generated graph looked like
While by calling
mermaid.init()
, I got graph likeAny idea how to solve this problem?
Thanks
The text was updated successfully, but these errors were encountered: