fralau / mkdocs-mermaid2-plugin

A Mermaid graphs plugin for mkdocs
https://mkdocs-mermaid2.readthedocs.io
MIT License
202 stars 25 forks source link

Add Zoom and Pan to Diagrams? (ER Diagram very tiny) #103

Open plbremer opened 2 months ago

plbremer commented 2 months ago

I am not sure if I should be asking this on the mkdocs main repo or here.

The font size of my rendered ER Diagram is so small that it is unusable.

What is the recommended way to make this rendered diagram usable? I looked around and could not find any sort of config to add a zoom/scroll wheel. I am not sure where to start in terms of generating an image from a given markdown. Any advice would be appreciated!

image
github-actions[bot] commented 2 months ago

Thank you for your contribution! This is very appreciated.

fralau commented 2 months ago

Beautiful diagram!

It is an issue on which I have had my attention on for some time. In principle, the Mermaid2 plugin doesn't do any theming or css. It is using the standard Mermaid standard javascript library, in the context of your MkDocs theme.

So, the starting point would be: which MkDocs theme are you using?

Is it Material, you might be in a better position. It doesn't mean that the theme's author (@squidfunk) would be able to fix this issue for you. But he might have some idea on where to look for a solution?

squidfunk commented 2 months ago

Thanks for tagging! Related issue: https://github.com/squidfunk/mkdocs-material/issues/5208

plbremer commented 2 months ago

Hi Thanks for the response. I made my own topic here: https://github.com/squidfunk/mkdocs-material/discussions/7095

TLDR - I have about 0 hope of making a custom plugin in an amount of time that works. I was going to basically involve the mermaid javascript cli directly as a workaround. I ended up going with a different diagram entirely, rendering this moot.

fralau commented 1 month ago

I note @squidfunk suggestion to use mkdocs-glitchbox.

For https://github.com/squidfunk/mkdocs-material/discussions/7095, I already thought of pre-producing images, but so far I have decided against it. The main advantage of the javascript library being that it is interactive (hyperlink are available).