支持Ctrl+左键多选

This commit is contained in:
wanglin2
2022-08-05 17:21:21 +08:00
parent 3c9940e076
commit 5df8a28403
4 changed files with 11 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ class Select {
if (this.mindMap.opt.readonly) {
return
}
if (e.which !== 3) {
if (!e.ctrlKey && e.which !== 3) {
return
}
this.isMousedown = true

View File

@@ -50,6 +50,10 @@ class View {
this.sy = this.y
})
this.mindMap.event.on('drag', (e, event) => {
if (e.ctrlKey) {
// 按住ctrl键拖动为多选
return
}
if (this.firstDrag) {
this.firstDrag = false
// 清除激活节点

View File

@@ -279,6 +279,11 @@ export const shortcutKeyList = [
name: '全选',
value: 'Ctrl + A'
},
{
icon: 'iconquanxuan',
name: '多选',
value: '右键 / Ctrl + 左键'
},
{
icon: 'iconzhengli',
name: '一键整理布局',

View File

@@ -51,7 +51,7 @@ export default {
<style lang="less" scoped>
.box {
padding: 20px;
padding: 0 20px;
.title {
font-size: 16px;