diff --git a/simple-mind-map/index.js b/simple-mind-map/index.js index cc1c86ae..b8bf6d85 100644 --- a/simple-mind-map/index.js +++ b/simple-mind-map/index.js @@ -124,7 +124,9 @@ const defaultOpt = { // 关联线默认文字 defaultAssociativeLineText: '关联', // 思维导图适应画布大小时的内边距 - fitPadding: 50 + fitPadding: 50, + // 是否开启按住ctrl键多选节点功能 + enableCtrlKeyNodeSelection: true } // 思维导图 diff --git a/simple-mind-map/src/core/render/node/Node.js b/simple-mind-map/src/core/render/node/Node.js index 8884ea69..07981ab8 100644 --- a/simple-mind-map/src/core/render/node/Node.js +++ b/simple-mind-map/src/core/render/node/Node.js @@ -359,7 +359,7 @@ class Node { e.stopPropagation() } // 多选和取消多选 - if (e.ctrlKey) { + if (e.ctrlKey && this.mindMap.opt.enableCtrlKeyNodeSelection) { this.isMultipleChoice = true let isActive = this.nodeData.data.isActive if (!isActive) diff --git a/web/src/pages/Doc/en/changelog/index.md b/web/src/pages/Doc/en/changelog/index.md index b68343c3..ade5616e 100644 --- a/web/src/pages/Doc/en/changelog/index.md +++ b/web/src/pages/Doc/en/changelog/index.md @@ -4,7 +4,7 @@ optimization: Optimize the directory structure of simple-mind-map source code. -New: 1.Supports one click zoom to fit the canvas function. +New: 1.Supports one click zoom to fit the canvas function. 2.Press and hold the Ctrl key to activate the multi selection function on demand through configuration. ## 0.5.11 diff --git a/web/src/pages/Doc/en/changelog/index.vue b/web/src/pages/Doc/en/changelog/index.vue index 42e747d0..346eba63 100644 --- a/web/src/pages/Doc/en/changelog/index.vue +++ b/web/src/pages/Doc/en/changelog/index.vue @@ -3,7 +3,7 @@
optimization: Optimize the directory structure of simple-mind-map source code.
-New: 1.Supports one click zoom to fit the canvas function.
+New: 1.Supports one click zoom to fit the canvas function. 2.Press and hold the Ctrl key to activate the multi selection function on demand through configuration.
New: Supports associative text editing.
optimization: Optimizing theme configuration updates, changing configurations that do not involve node size does not trigger node recalculation.
diff --git a/web/src/pages/Doc/en/constructor/index.md b/web/src/pages/Doc/en/constructor/index.md index ad2f2bc8..c90cd00a 100644 --- a/web/src/pages/Doc/en/constructor/index.md +++ b/web/src/pages/Doc/en/constructor/index.md @@ -64,6 +64,7 @@ const mindMap = new MindMap({ | maxNodeCacheCount(v0.5.10+) | Number | 1000 | The maximum number of cached nodes. To optimize performance, an internal node cache pool is maintained to reuse nodes. This attribute allows you to specify the maximum number of caches in the pool | | | defaultAssociativeLineText(v0.5.11+) | String | 关联 | Association Line Default Text | | | fitPadding(v0.6.0+) | Number | 50 | The padding of mind mapping when adapting to canvas size, Unit: px | | +| enableCtrlKeyNodeSelection(v0.6.0+) | Boolean | true | Whether to enable the function of holding down the Ctrl key to select multiple nodes | | ### Watermark config diff --git a/web/src/pages/Doc/en/constructor/index.vue b/web/src/pages/Doc/en/constructor/index.vue index 9c6a5d04..25e45378 100644 --- a/web/src/pages/Doc/en/constructor/index.vue +++ b/web/src/pages/Doc/en/constructor/index.vue @@ -308,6 +308,13 @@优化:优化simple-mind-map源码目录结构。
-新增:1.支持一键缩放至适应画布功能。
+新增:1.支持一键缩放至适应画布功能。 2.按住Ctrl键多选功能可通过配置按需开启。
新增:支持关联性文本编辑。
优化:优化主题配置更新,改变不涉及节点大小的配置不触发节点重新计算。
diff --git a/web/src/pages/Doc/zh/constructor/index.md b/web/src/pages/Doc/zh/constructor/index.md index 2d47cd7e..76a6985f 100644 --- a/web/src/pages/Doc/zh/constructor/index.md +++ b/web/src/pages/Doc/zh/constructor/index.md @@ -64,6 +64,7 @@ const mindMap = new MindMap({ | maxNodeCacheCount(v0.5.10+) | Number | 1000 | 节点最大缓存数量。为了优化性能,内部会维护一个节点缓存池,用来复用节点,通过该属性可以指定池的最大缓存数量 | | | defaultAssociativeLineText(v0.5.11+) | String | 关联 | 关联线默认文字 | | | fitPadding(v0.6.0+) | Number | 50 | 思维导图适应画布大小时的内边距,单位:px | | +| enableCtrlKeyNodeSelection(v0.6.0+) | Boolean | true | 是否开启按住ctrl键多选节点的功能 | | ### 水印配置 diff --git a/web/src/pages/Doc/zh/constructor/index.vue b/web/src/pages/Doc/zh/constructor/index.vue index 3ffac050..f2360ce7 100644 --- a/web/src/pages/Doc/zh/constructor/index.vue +++ b/web/src/pages/Doc/zh/constructor/index.vue @@ -308,6 +308,13 @@