MCPcopy Index your code
hub / github.com/wanglin2/mind-map / hideEditTextBox

Method hideEditTextBox

simple-mind-map/src/core/render/TextEdit.js:475–504  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers 15

bindEventMethod · 0.95
registerTmpShortcutMethod · 0.95
showMethod · 0.95
setModeMethod · 0.80
destroyMethod · 0.80
insertNodeMethod · 0.80
insertMultiNodeMethod · 0.80
insertChildNodeMethod · 0.80
insertMultiChildNodeMethod · 0.80
insertParentNodeMethod · 0.80
removeNodeMethod · 0.80
onBeforeDestroyMethod · 0.80

Calls 6

getEditTextMethod · 0.95
setIsShowTextEditMethod · 0.95
hideEditTextMethod · 0.80
execCommandMethod · 0.80
emitMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected