diff --git a/.gitignore b/.gitignore index f18f78ea..ce3d8a8f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules .DS_Store dist_electron simple-mind-map/dist -simple-mind-map/types \ No newline at end of file +simple-mind-map/types +utools/dist \ No newline at end of file diff --git a/simple-mind-map/src/core/render/node/quickCreateChildBtn.js b/simple-mind-map/src/core/render/node/quickCreateChildBtn.js index 257cb883..bf19a3a8 100644 --- a/simple-mind-map/src/core/render/node/quickCreateChildBtn.js +++ b/simple-mind-map/src/core/render/node/quickCreateChildBtn.js @@ -2,13 +2,14 @@ import btnsSvg from '../../../svg/btns' import { SVG, Circle, G } from '@svgdotjs/svg.js' function initQuickCreateChildBtn() { + if (this.isGeneralization) return this._quickCreateChildBtn = null this._showQuickCreateChildBtn = false } // 显示按钮 function showQuickCreateChildBtn() { - if (this.getChildrenLength() > 0) return + if (this.isGeneralization || this.getChildrenLength() > 0) return // 创建按钮 if (this._quickCreateChildBtn) { this.group.add(this._quickCreateChildBtn) @@ -63,6 +64,7 @@ function showQuickCreateChildBtn() { // 移除按钮 function removeQuickCreateChildBtn() { + if (this.isGeneralization) return if (this._quickCreateChildBtn && this._showQuickCreateChildBtn) { this._quickCreateChildBtn.remove() this._showQuickCreateChildBtn = false @@ -71,6 +73,7 @@ function removeQuickCreateChildBtn() { // 隐藏按钮 function hideQuickCreateChildBtn() { + if (this.isGeneralization) return const { isActive } = this.getData() if (!isActive) { this.removeQuickCreateChildBtn()