squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
21.14k stars 3.57k forks source link

zoom / pan for mermaid diagrams #5208

Closed haneul closed 1 year ago

haneul commented 1 year ago

Context

No response

Description

Now github provides a control for zooming / panning diagrams from mermaidjs. That's quite helpful for showing a large diagrams. Can we have something similar with mkdocs material? See example from https://github.com/squidfunk/mkdocs-material/blob/master/docs/reference/diagrams.md#using-flowcharts

Related links

Use Cases

Many users use mkdocs for showing diagrams, so it would be helpful.

Visuals

No response

Before submitting

squidfunk commented 1 year ago

Thanks for suggesting. The mkdocs-glightbox plugin already supports zooming and panning of images, and since the underlying glightbox library supports arbitrary inline content, it should be extendable to Mermaid.js diagrams without problems. Thus, this change request is better implemented in mkdocs-glightbox. Closing as out-of-scope.

alexeych0 commented 1 year ago

Seems unfair. glitchbox operates with images, not diagrams. It looks like it should be the standalone plugin like it's done for docsify: https://github.com/corentinleberre/docsify-mermaid-zoom

squidfunk commented 1 year ago

You are invited to write a third-party plugin or JavaScript extension. Feel free to share it here, it you do! ☺️

datnguye commented 8 months ago

Hey folks, is there any updates on the official supported zoom & pan here, or any recommended plugin for it?

Thanks a lot!

55Cancri commented 7 months ago

I need zoom and pan for a large mermaid diagram embedded in notion

PLAYG0N commented 2 months ago

Hi all

This bothered me for too long so I made my own plugin. You can check it out here. Let me know if anything doesn't work.

Note: This plugin is still in beta!

Hope this helps!