Re-enable zooming in mermaid diagram after changing theme #5164
Unanswered
george-gca
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently a maintainer in a jekyll academic theme, which has support for mermaid via jekyll-diagrams. I decided to move away from this solution, since it doesn't offer support for both changing theme and d3 zoom. I was able to implement this successfully, but not the d3 zoom part.
Currently the solution is this: it converts the mermaid markdown diagram to a visible diagram correctly, with support for zooming in. For this a
<g>
tag is created that contains the whole svg drawing inside.As you can see, when I interact with the component it correctly apply the zoom both visually and in the code. But when I change the theme to dark mode and tell it to regenerate the diagram with the correct theme, the zooming function stops working, letting me just select the text inside instead.
Any help would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions