Fix:修复文本编辑实时渲染模式编辑中展开收起按钮闪烁的问题

This commit is contained in:
街角小林
2025-01-21 15:47:50 +08:00
parent 407b86c5ee
commit 34f6fdd8e2
4 changed files with 18 additions and 0 deletions

View File

@@ -318,6 +318,13 @@ const mindMap = new MindMap({
<sub style="font-size:14px"><b>御风</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 75.0; height: 75.0">
<a href="#">
<img src="./web/src/assets/avatar/兔子快跑.jpg" width="50;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px"/>
<br />
<sub style="font-size:14px"><b>兔子快跑</b></sub>
</a>
</td>
</tr>
</table>
@@ -915,5 +922,12 @@ const mindMap = new MindMap({
<sub style="font-size:14px"><b>Sword</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 75.0; height: 75.0">
<a href="#">
<img src="./web/src/assets/avatar/好好先生Ervin.jpg" width="50;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px"/>
<br />
<sub style="font-size:14px"><b>好好先生Ervin</b></sub>
</a>
</td>
</tr>
</table>

View File

@@ -448,6 +448,10 @@ class MindMapNode {
this.group.clear()
const { hoverRectPadding, tagPosition, openRealtimeRenderOnNodeTextEdit } =
this.mindMap.opt
// 避免编辑过程中展开收起按钮闪烁的问题
if (openRealtimeRenderOnNodeTextEdit && this._expandBtn) {
this.group.add(this._expandBtn)
}
let { width, height, textContentItemMargin } = this
let { paddingY } = this.getPaddingVale()
const halfBorderWidth = this.getBorderWidth() / 2

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB