mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Feat:支持配置是否开启双击复位思维导图
This commit is contained in:
parent
061c82459e
commit
26508b5a62
@ -164,5 +164,7 @@ export const defaultOpt = {
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
`
|
||||
`,
|
||||
// 开启鼠标双击复位思维导图位置及缩放
|
||||
enableDblclickReset: true
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@ class View {
|
||||
this.fit()
|
||||
})
|
||||
this.mindMap.svg.on('dblclick', () => {
|
||||
if (!this.mindMap.opt.enableDblclickReset) return
|
||||
this.reset()
|
||||
})
|
||||
// 拖动视图
|
||||
|
||||
Loading…
Reference in New Issue
Block a user