Feat:同时激活多个节点时编辑某个节点的文本只对该节点生效
This commit is contained in:
parent
ca5075d50c
commit
ec6a40e381
@ -334,15 +334,16 @@ export default class TextEdit {
|
|||||||
if (!this.showTextEdit) {
|
if (!this.showTextEdit) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.renderer.activeNodeList.forEach(node => {
|
this.mindMap.execCommand(
|
||||||
let str = this.getEditText()
|
'SET_NODE_TEXT',
|
||||||
this.mindMap.execCommand('SET_NODE_TEXT', node, str)
|
this.currentNode,
|
||||||
if (node.isGeneralization) {
|
this.getEditText()
|
||||||
// 概要节点
|
)
|
||||||
node.generalizationBelongNode.updateGeneralization()
|
if (this.currentNode.isGeneralization) {
|
||||||
}
|
// 概要节点
|
||||||
this.mindMap.render()
|
this.currentNode.generalizationBelongNode.updateGeneralization()
|
||||||
})
|
}
|
||||||
|
this.mindMap.render()
|
||||||
const currentNode = this.currentNode
|
const currentNode = this.currentNode
|
||||||
this.currentNode = null
|
this.currentNode = null
|
||||||
this.textEditNode.style.display = 'none'
|
this.textEditNode.style.display = 'none'
|
||||||
|
|||||||
@ -388,8 +388,7 @@ class RichText {
|
|||||||
}
|
}
|
||||||
let html = this.getEditText()
|
let html = this.getEditText()
|
||||||
html = this.sortHtmlNodeStyles(html)
|
html = this.sortHtmlNodeStyles(html)
|
||||||
let list =
|
const list = nodes && nodes.length > 0 ? nodes : [this.node]
|
||||||
nodes && nodes.length > 0 ? nodes : this.mindMap.renderer.activeNodeList
|
|
||||||
list.forEach(node => {
|
list.forEach(node => {
|
||||||
this.mindMap.execCommand('SET_NODE_TEXT', node, html, true)
|
this.mindMap.execCommand('SET_NODE_TEXT', node, html, true)
|
||||||
// if (node.isGeneralization) {
|
// if (node.isGeneralization) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user