Feat:可通过配置决定是否开启按住ctrl键多选节点的功能

This commit is contained in:
wanglin2 2023-06-08 20:18:13 +08:00
parent ee467cb155
commit 4d91be5be6
10 changed files with 24 additions and 6 deletions

View File

@ -124,7 +124,9 @@ const defaultOpt = {
// 关联线默认文字
defaultAssociativeLineText: '关联',
// 思维导图适应画布大小时的内边距
fitPadding: 50
fitPadding: 50,
// 是否开启按住ctrl键多选节点功能
enableCtrlKeyNodeSelection: true
}
// 思维导图

View File

@ -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)

View File

@ -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

View File

@ -3,7 +3,7 @@
<h1>Changelog</h1>
<h2>0.6.0</h2>
<p>optimization: Optimize the directory structure of simple-mind-map source code.</p>
<p>New: 1.Supports one click zoom to fit the canvas function.</p>
<p>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.</p>
<h2>0.5.11</h2>
<p>New: Supports associative text editing.</p>
<p>optimization: Optimizing theme configuration updates, changing configurations that do not involve node size does not trigger node recalculation.</p>

View File

@ -64,6 +64,7 @@ const mindMap = new MindMap({
| maxNodeCacheCountv0.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 | |
| defaultAssociativeLineTextv0.5.11+ | String | 关联 | Association Line Default Text | |
| fitPaddingv0.6.0+ | Number | 50 | The padding of mind mapping when adapting to canvas size, Unit: px | |
| enableCtrlKeyNodeSelectionv0.6.0+ | Boolean | true | Whether to enable the function of holding down the Ctrl key to select multiple nodes | |
### Watermark config

View File

@ -308,6 +308,13 @@
<td>The padding of mind mapping when adapting to canvas size, Unit: px</td>
<td></td>
</tr>
<tr>
<td>enableCtrlKeyNodeSelectionv0.6.0+</td>
<td>Boolean</td>
<td>true</td>
<td>Whether to enable the function of holding down the Ctrl key to select multiple nodes</td>
<td></td>
</tr>
</tbody>
</table>
<h3>Watermark config</h3>

View File

@ -4,7 +4,7 @@
优化优化simple-mind-map源码目录结构。
新增1.支持一键缩放至适应画布功能。
新增1.支持一键缩放至适应画布功能。 2.按住Ctrl键多选功能可通过配置按需开启。
## 0.5.11

View File

@ -3,7 +3,7 @@
<h1>Changelog</h1>
<h2>0.6.0</h2>
<p>优化优化simple-mind-map源码目录结构</p>
<p>新增1.支持一键缩放至适应画布功能</p>
<p>新增1.支持一键缩放至适应画布功能 2.按住Ctrl键多选功能可通过配置按需开启</p>
<h2>0.5.11</h2>
<p>新增支持关联性文本编辑</p>
<p>优化优化主题配置更新改变不涉及节点大小的配置不触发节点重新计算</p>

View File

@ -64,6 +64,7 @@ const mindMap = new MindMap({
| maxNodeCacheCountv0.5.10+ | Number | 1000 | 节点最大缓存数量。为了优化性能,内部会维护一个节点缓存池,用来复用节点,通过该属性可以指定池的最大缓存数量 | |
| defaultAssociativeLineTextv0.5.11+ | String | 关联 | 关联线默认文字 | |
| fitPaddingv0.6.0+ | Number | 50 | 思维导图适应画布大小时的内边距单位px | |
| enableCtrlKeyNodeSelectionv0.6.0+ | Boolean | true | 是否开启按住ctrl键多选节点的功能 | |
### 水印配置

View File

@ -308,6 +308,13 @@
<td>思维导图适应画布大小时的内边距单位px</td>
<td></td>
</tr>
<tr>
<td>enableCtrlKeyNodeSelectionv0.6.0+</td>
<td>Boolean</td>
<td>true</td>
<td>是否开启按住ctrl键多选节点的功能</td>
<td></td>
</tr>
</tbody>
</table>
<h3>水印配置</h3>