mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-23 03:17:41 +08:00
Fix:修复非富文本模式下文本编辑实时渲染功能在一些结构中会出现异常的问题
This commit is contained in:
parent
53c2af0bc0
commit
efb4dcf236
@ -209,8 +209,7 @@ class Render {
|
||||
node.height = height
|
||||
node.layout()
|
||||
this.mindMap.render(() => {
|
||||
// 输入框的left不会改变,所以无需更新
|
||||
this.textEdit.updateTextEditNode(['left'])
|
||||
this.textEdit.updateTextEditNode()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -379,8 +379,7 @@ export default class TextEdit {
|
||||
}
|
||||
|
||||
// 更新文本编辑框的大小和位置
|
||||
// notChangeProps:不会发生改变的属性列表
|
||||
updateTextEditNode(notChangeProps = []) {
|
||||
updateTextEditNode() {
|
||||
if (this.mindMap.richText) {
|
||||
this.mindMap.richText.updateTextEditNode()
|
||||
return
|
||||
@ -393,8 +392,7 @@ export default class TextEdit {
|
||||
rect.width + this.textNodePaddingX * 2 + 'px'
|
||||
this.textEditNode.style.minHeight =
|
||||
rect.height + this.textNodePaddingY * 2 + 'px'
|
||||
if (!notChangeProps.includes('left'))
|
||||
this.textEditNode.style.left = rect.left + 'px'
|
||||
this.textEditNode.style.left = rect.left + 'px'
|
||||
this.textEditNode.style.top = rect.top + 'px'
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user