支持Ctrl+左键多选
This commit is contained in:
parent
3c9940e076
commit
5df8a28403
@ -34,7 +34,7 @@ class Select {
|
|||||||
if (this.mindMap.opt.readonly) {
|
if (this.mindMap.opt.readonly) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (e.which !== 3) {
|
if (!e.ctrlKey && e.which !== 3) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.isMousedown = true
|
this.isMousedown = true
|
||||||
|
|||||||
@ -50,6 +50,10 @@ class View {
|
|||||||
this.sy = this.y
|
this.sy = this.y
|
||||||
})
|
})
|
||||||
this.mindMap.event.on('drag', (e, event) => {
|
this.mindMap.event.on('drag', (e, event) => {
|
||||||
|
if (e.ctrlKey) {
|
||||||
|
// 按住ctrl键拖动为多选
|
||||||
|
return
|
||||||
|
}
|
||||||
if (this.firstDrag) {
|
if (this.firstDrag) {
|
||||||
this.firstDrag = false
|
this.firstDrag = false
|
||||||
// 清除激活节点
|
// 清除激活节点
|
||||||
|
|||||||
@ -279,6 +279,11 @@ export const shortcutKeyList = [
|
|||||||
name: '全选',
|
name: '全选',
|
||||||
value: 'Ctrl + A'
|
value: 'Ctrl + A'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: 'iconquanxuan',
|
||||||
|
name: '多选',
|
||||||
|
value: '右键 / Ctrl + 左键'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
icon: 'iconzhengli',
|
icon: 'iconzhengli',
|
||||||
name: '一键整理布局',
|
name: '一键整理布局',
|
||||||
|
|||||||
@ -51,7 +51,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.box {
|
.box {
|
||||||
padding: 20px;
|
padding: 0 20px;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user