mermaid: make zoom configurable

This commit is contained in:
Sören Weber 2023-02-05 11:13:03 +01:00
parent 98f5959a33
commit a046b9300f
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
7 changed files with 38 additions and 10 deletions
static/js

View file

@ -227,7 +227,7 @@ function initMermaid( update, attrs ) {
mermaid.init();
// zoom for Mermaid
// https://github.com/mermaid-js/mermaid/issues/1860#issuecomment-1345440607
var svgs = d3.selectAll( '.mermaid svg' );
var svgs = d3.selectAll( '.mermaid.zoom svg' );
svgs.each( function(){
var svg = d3.select( this );
svg.html( '<g>' + svg.html() + '</g>' );