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