mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-17 22:08:25 +08:00
Demo:修复画布边缘节点备注浮层显示不完全的问题
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user