From de6bd0c3ef8f120e9a24ecc30be7341dd1d3c7b0 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Mon, 11 Dec 2023 22:32:11 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=E4=BF=AE=E5=A4=8D=E5=BD=93=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=96=87=E6=9C=AC=E4=B8=BA=E7=A9=BA=E6=97=B6=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=B5=8F=E8=A7=88=E5=99=A8=E4=BC=9A=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=96=87=E6=9C=AC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/core/render/node/nodeCreateContents.js | 1 + 1 file changed, 1 insertion(+) diff --git a/simple-mind-map/src/core/render/node/nodeCreateContents.js b/simple-mind-map/src/core/render/node/nodeCreateContents.js index b29f98ea..78e15d42 100644 --- a/simple-mind-map/src/core/render/node/nodeCreateContents.js +++ b/simple-mind-map/src/core/render/node/nodeCreateContents.js @@ -140,6 +140,7 @@ function createRichTextNode() { let elTmp = div.children[0] elTmp.classList.add('smm-richtext-node-wrap') height = elTmp.getBoundingClientRect().height + div.innerHTML = html } width = Math.ceil(width) + 1 // 修复getBoundingClientRect方法对实际宽度是小数的元素获取到的值是整数,导致宽度不够文本发生换行的问题 height = Math.ceil(height)