Demo:修复画布边缘节点备注浮层显示不完全的问题

This commit is contained in:
wanglin2
2025-03-30 16:04:08 +08:00
parent bd2cfda905
commit 94ed53b31f

View File

@@ -95,8 +95,10 @@ export default {
// 更新位置
updateNoteContentPosition(left, top) {
this.left = left
this.top = top
const { width, height } = this.$refs.noteContentViewer.getBoundingClientRect()
const { right, bottom } = this.mindMap.elRect
this.left = left + width > right ? right - width : left
this.top = top + height > bottom ? bottom - height : top
},
// 画布缩放事件
@@ -131,6 +133,7 @@ export default {
border-radius: 5px;
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.06);
border: 1px solid rgba(0, 0, 0, 0.06);
z-index: 2;
.noteContentWrap {
max-width: 250px;