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