fix(数据大屏): 修复尺寸较小的画布没有定位到中心点问题

This commit is contained in:
wangjiahao
2024-12-01 20:08:19 +08:00
parent 0139a3a13b
commit 094455446d
2 changed files with 2 additions and 1 deletions

View File

@@ -188,6 +188,7 @@ defineExpose({
}
.ruler-outer-scroll {
min-width: 1600px;
display: flex;
justify-content: center;
}

View File

@@ -142,7 +142,6 @@ const onMouseMove = e => {
const walkY = y - startY
canvasOut.value.wrapRef.scrollLeft = scrollLeft - walkX
canvasOut.value.wrapRef.scrollTop = scrollTop - walkY
console.log('====onMouseMove==walkX=' + walkX + ';walkY=' + walkY)
}
// 禁用拖动
@@ -160,6 +159,7 @@ const contentStyle = computed(() => {
}
} else {
return {
minWidth: '1600px',
width: width * 1.5 + 'px',
height: height * 1.5 + 'px'
}