fix(数据大屏): 修复宽高比保持时大幅度移动出现比例改变问题

This commit is contained in:
wangjiahao 2024-02-28 12:53:03 +08:00
parent edc695ad53
commit 7c660f8445

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
} }
} }