mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
mermaid: show reset button after pan #807
This commit is contained in:
parent
ec5dde6442
commit
f1c8e5c79d
1 changed files with 1 additions and 1 deletions
|
@ -323,7 +323,7 @@ function initMermaid( update, attrs ) {
|
||||||
var button = parent.querySelector( '.svg-reset-button' );
|
var button = parent.querySelector( '.svg-reset-button' );
|
||||||
var zoom = d3.zoom().on( 'zoom', function( e ){
|
var zoom = d3.zoom().on( 'zoom', function( e ){
|
||||||
inner.attr( 'transform', e.transform );
|
inner.attr( 'transform', e.transform );
|
||||||
if( e.transform.k == 1 ){
|
if( e.transform.k == 1 && e.transform.x == 0 && e.transform.y == 0 ){
|
||||||
button.classList.remove( 'zoomed' );
|
button.classList.remove( 'zoomed' );
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
Loading…
Reference in a new issue