mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Fix:修复mac上useLeftKeySelectionRightKeyDrag为true 时无法按住ctrl键多选节点的问题
This commit is contained in:
parent
69264e3a9d
commit
d7bd57ffac
@ -165,6 +165,8 @@ class Event extends EventEmitter {
|
||||
// 鼠标右键菜单事件
|
||||
onContextmenu(e) {
|
||||
e.preventDefault()
|
||||
// Mac上按住ctrl键点击鼠标左键不知为何触发的是contextmenu事件
|
||||
if (e.ctrlKey) return
|
||||
this.emit('contextmenu', e)
|
||||
}
|
||||
|
||||
|
||||
@ -495,7 +495,7 @@ class Node {
|
||||
// 右键菜单事件
|
||||
this.group.on('contextmenu', e => {
|
||||
const { readonly, useLeftKeySelectionRightKeyDrag } = this.mindMap.opt
|
||||
// 按住ctrl键点击鼠标左键不知为何触发的是contextmenu事件
|
||||
// Mac上按住ctrl键点击鼠标左键不知为何触发的是contextmenu事件
|
||||
if (readonly || e.ctrlKey) {
|
||||
return
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user