forked from github/dataease
Merge pull request #8317 from dataease/pr@dev-v2@fix_shape-drage-point
fix(数据大屏): 修复组件缩放到很小时右下拖拽点会使产生位置移问题
This commit is contained in:
commit
78b4279598
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user