Merge pull request #8209 from dataease/pr@dev-v2@fix_move-radio

fix(数据大屏): 修复宽高比保持时大幅度移动出现比例改变问题
This commit is contained in:
王嘉豪 2024-02-28 12:54:04 +08:00 committed by GitHub
commit c493eafce0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -662,13 +662,13 @@ const handleMouseDownOnPoint = (point, e) => {
// //
const adaptorHeightOffset = widthOffset / originRadio const adaptorHeightOffset = widthOffset / originRadio
if (pointCorner.includes(point)) { if (pointCorner.includes(point)) {
style.height = defaultStyle.value.height + adaptorHeightOffset style.height = defaultStyle.value.width / originRadio
} else if (Math.abs(widthOffset) > Math.abs(adaptorWidthOffset)) { } else if (Math.abs(widthOffset) > Math.abs(adaptorWidthOffset)) {
// //
style.height = defaultStyle.value.height + adaptorHeightOffset style.height = defaultStyle.value.width / originRadio
} else { } else {
// //
style.width = defaultStyle.value.width + adaptorWidthOffset style.width = defaultStyle.value.height * originRadio
} }
} }