mgaitan/sphinxcontrib-mermaid

Add optional zoom functionality

dalthviz opened this issue · 3 comments

Hi, checking how to add zoom functionality to mermaid graphs I did this implementation modifying the extension to use d3: dalthviz@a0c0437

It is based on the comment at mermaid-js/mermaid#1860 (comment)

The idea is to add an option to enable zooming generated mermaid graphs through d3 and a script (from what I checked the above works with the default raw output format).

Could be interesting for the extension to add optional zoom functionality to the generated mermaid graphs using d3?

And thank you for making this extension!

@dalthviz it seems a very good feature to have, please go ahead with a PR.

I'm wondering if it could be possible to do it per diagram using a directive option like

.. mermaid::
   :zoom: 

    <mermaid code>

Thank you for the quick response @mgaitan ! Regarding the option per diagram, you mean only having that one or having the global one and also one per diagram that can 'override' the global config? Either way, I will try to explorer how to do the per diagram directive option 👍

Hi, is there any timeline when will this great feature be included? This will greatly helps us to avoid re-inventing the wheel. 👍