()
| 473 | |
| 474 | // 隐藏文本编辑框 |
| 475 | hideEditTextBox() { |
| 476 | if (this.mindMap.richText) { |
| 477 | return this.mindMap.richText.hideEditText() |
| 478 | } |
| 479 | if (!this.showTextEdit) { |
| 480 | return |
| 481 | } |
| 482 | const currentNode = this.currentNode |
| 483 | const text = this.getEditText() |
| 484 | this.currentNode = null |
| 485 | this.textEditNode.style.display = 'none' |
| 486 | this.textEditNode.innerHTML = '' |
| 487 | this.textEditNode.style.fontFamily = 'inherit' |
| 488 | this.textEditNode.style.fontSize = 'inherit' |
| 489 | this.textEditNode.style.fontWeight = 'normal' |
| 490 | this.textEditNode.style.transform = 'translateY(0)' |
| 491 | this.setIsShowTextEdit(false) |
| 492 | this.mindMap.execCommand('SET_NODE_TEXT', currentNode, text) |
| 493 | // if (currentNode.isGeneralization) { |
| 494 | // // 概要节点 |
| 495 | // currentNode.generalizationBelongNode.updateGeneralization() |
| 496 | // } |
| 497 | this.mindMap.render() |
| 498 | this.mindMap.emit( |
| 499 | 'hide_text_edit', |
| 500 | this.textEditNode, |
| 501 | this.renderer.activeNodeList, |
| 502 | currentNode |
| 503 | ) |
| 504 | } |
| 505 | |
| 506 | // 获取当前正在编辑中的节点实例 |
| 507 | getCurrentEditNode() { |
no test coverage detected