Merge pull request #13710 from dataease/pr@dev-v2@fix_canvas-size
Some checks are pending
Typos Check / Spell Check with Typos (push) Waiting to run

fix(数据大屏): 修复尺寸较小的画布没有定位到中心点问题
This commit is contained in:
王嘉豪 2024-12-01 20:10:03 +08:00 committed by GitHub
commit 976195fab6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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'
}