forked from github/dataease
fix(数据大屏): 修复宽高比保持时大幅度移动出现比例改变问题
This commit is contained in:
parent
edc695ad53
commit
7c660f8445
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user