Fix:调整hide_text_edit事件触发时机,防止一些情况下的死循环问题
This commit is contained in:
parent
9d64a508d6
commit
9229f13172
@ -313,12 +313,7 @@ export default class TextEdit {
|
|||||||
}
|
}
|
||||||
this.mindMap.render()
|
this.mindMap.render()
|
||||||
})
|
})
|
||||||
this.mindMap.emit(
|
const currentNode = this.currentNode
|
||||||
'hide_text_edit',
|
|
||||||
this.textEditNode,
|
|
||||||
this.renderer.activeNodeList,
|
|
||||||
this.currentNode
|
|
||||||
)
|
|
||||||
this.currentNode = null
|
this.currentNode = null
|
||||||
this.textEditNode.style.display = 'none'
|
this.textEditNode.style.display = 'none'
|
||||||
this.textEditNode.innerHTML = ''
|
this.textEditNode.innerHTML = ''
|
||||||
@ -327,6 +322,12 @@ export default class TextEdit {
|
|||||||
this.textEditNode.style.fontWeight = 'normal'
|
this.textEditNode.style.fontWeight = 'normal'
|
||||||
this.textEditNode.style.transform = 'translateY(0)'
|
this.textEditNode.style.transform = 'translateY(0)'
|
||||||
this.showTextEdit = false
|
this.showTextEdit = false
|
||||||
|
this.mindMap.emit(
|
||||||
|
'hide_text_edit',
|
||||||
|
this.textEditNode,
|
||||||
|
this.renderer.activeNodeList,
|
||||||
|
currentNode
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前正在编辑中的节点实例
|
// 获取当前正在编辑中的节点实例
|
||||||
|
|||||||
@ -360,12 +360,13 @@ class RichText {
|
|||||||
// }
|
// }
|
||||||
this.mindMap.render()
|
this.mindMap.render()
|
||||||
})
|
})
|
||||||
this.mindMap.emit('hide_text_edit', this.textEditNode, list, this.node)
|
const node = this.node
|
||||||
this.textEditNode.style.display = 'none'
|
this.textEditNode.style.display = 'none'
|
||||||
this.showTextEdit = false
|
this.showTextEdit = false
|
||||||
this.mindMap.emit('rich_text_selection_change', false)
|
this.mindMap.emit('rich_text_selection_change', false)
|
||||||
this.node = null
|
this.node = null
|
||||||
this.isInserting = false
|
this.isInserting = false
|
||||||
|
this.mindMap.emit('hide_text_edit', this.textEditNode, list, node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化Quill富文本编辑器
|
// 初始化Quill富文本编辑器
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user