This commit is contained in:
aqu415
2022-03-22 11:14:30 +08:00
parent 138b90b945
commit 83783e6ca8
+3 -3
View File
@@ -1516,9 +1516,9 @@
auto_height_node_before_update: function (node) { auto_height_node_before_update: function (node) {
const topic = node.topic const topic = node.topic
if (!!topic) { if (!!topic) {
const lines = topic.split('\n').length const lines = topic.includes('<br/>') ? topic.split('<br/>').length : topic.split('\n').length
const view_data = node._data.view; const view_data = node._data.view
const element = view_data.element; const element = view_data.element
const height = (lines * 12 + 14) const height = (lines * 12 + 14)
element.style.height = `${height}px` element.style.height = `${height}px`
} }