mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
generator: fix mermaid zoom after #795
This commit is contained in:
parent
f1c8e5c79d
commit
bd94fe6b81
1 changed files with 2 additions and 2 deletions
|
@ -218,10 +218,10 @@ function initMermaid( update, attrs ) {
|
||||||
|
|
||||||
var graph = serializeGraph( parse );
|
var graph = serializeGraph( parse );
|
||||||
var new_element = document.createElement( 'div' );
|
var new_element = document.createElement( 'div' );
|
||||||
for( var attr of element.attributes ){
|
Array.from( element.attributes ).forEach( function( attr ){
|
||||||
new_element.setAttribute( attr.name, attr.value );
|
new_element.setAttribute( attr.name, attr.value );
|
||||||
element.removeAttribute( attr.name );
|
element.removeAttribute( attr.name );
|
||||||
}
|
});
|
||||||
new_element.classList.add( 'mermaid-container' );
|
new_element.classList.add( 'mermaid-container' );
|
||||||
new_element.classList.remove( 'mermaid' );
|
new_element.classList.remove( 'mermaid' );
|
||||||
element.classList.add( 'mermaid' );
|
element.classList.add( 'mermaid' );
|
||||||
|
|
Loading…
Reference in a new issue