Merge pull request #8317 from dataease/pr@dev-v2@fix_shape-drage-point

fix(数据大屏): 修复组件缩放到很小时右下拖拽点会使产生位置移问题
This commit is contained in:
王嘉豪 2024-03-04 18:23:07 +08:00 committed by GitHub
commit 78b4279598
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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
}
}