Feat:支持配置是否开启双击复位思维导图

This commit is contained in:
wanglin2 2023-08-24 17:40:35 +08:00
parent 061c82459e
commit 26508b5a62
2 changed files with 4 additions and 1 deletions

View File

@ -164,5 +164,7 @@ export const defaultOpt = {
padding: 0;
box-sizing: border-box;
}
`
`,
// 开启鼠标双击复位思维导图位置及缩放
enableDblclickReset: true
}

View File

@ -32,6 +32,7 @@ class View {
this.fit()
})
this.mindMap.svg.on('dblclick', () => {
if (!this.mindMap.opt.enableDblclickReset) return
this.reset()
})
// 拖动视图