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) { updateNoteContentPosition(left, top) {
this.left = left const { width, height } = this.$refs.noteContentViewer.getBoundingClientRect()
this.top = top 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; border-radius: 5px;
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.06); box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.06);
border: 1px solid rgba(0, 0, 0, 0.06); border: 1px solid rgba(0, 0, 0, 0.06);
z-index: 2;
.noteContentWrap { .noteContentWrap {
max-width: 250px; max-width: 250px;