fix(数据大屏): 修复组件缩放到很小时右下拖拽点会使产生位置移问题

This commit is contained in:
wangjiahao 2024-03-04 18:22:30 +08:00
parent 58adc4f2f0
commit c2afb68d33
2 changed files with 6 additions and 1 deletions

View File

@ -150,6 +150,7 @@ const state = reactive({
collisionGap: 10 // ,
})
const minGap = 15
const contentDisplay = ref(true)
const shapeLock = computed(() => {
@ -669,8 +670,9 @@ const handleMouseDownOnPoint = (point, e) => {
//
style.width = defaultStyle.value.height * originRadio
}
calculateRadioComponentPositionAndSize(point, style, symmetricPoint)
}
calculateRadioComponentPositionAndSize(point, style, symmetricPoint)
dvMainStore.setShapeStyle(style)
//
dashboardActive.value && emit('onResizing', moveEvent)

View File

@ -396,5 +396,8 @@ export function calculateRadioComponentPositionAndSize(name, style, symmetricPoi
} else if (['rt'].includes(name)) {
style.left = symmetricPoint.x
style.top = symmetricPoint.y - style.height
} else if (['rb'].includes(name)) {
style.left = symmetricPoint.x
style.top = symmetricPoint.y
}
}