mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-13 22:12:11 +08:00
🐞 fix: 修复画布大小计算逻辑
This commit is contained in:
parent
72a6fabfee
commit
a34164c7d7
@ -159,11 +159,11 @@ const dragCanvas = (e: any) => {
|
|||||||
const canvasBox = () => {
|
const canvasBox = () => {
|
||||||
const layoutDom = document.getElementById('go-chart-edit-layout')
|
const layoutDom = document.getElementById('go-chart-edit-layout')
|
||||||
if (layoutDom) {
|
if (layoutDom) {
|
||||||
// 此处减去滚动条的宽度和高度
|
// clientWidth和clientHeight获取到的就是不包括滚动条的
|
||||||
const scrollW = 20
|
// 这里应该减去的是标尺的厚度
|
||||||
return {
|
return {
|
||||||
height: layoutDom.clientHeight - scrollW,
|
height: layoutDom.clientHeight - thick,
|
||||||
width: layoutDom.clientWidth - scrollW
|
width: layoutDom.clientWidth - thick
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user