fix: 解决标尺组件相关问题

解决标尺宽高计算容易让人引起误解的问题;解决首次进来标尺刻度不对的问题,解决缩放后标尺刻度不对的问题
This commit is contained in:
yuanmogul 2023-10-19 23:00:57 +08:00
parent 6c54c168a6
commit c2050ae955

View File

@ -159,11 +159,11 @@ const dragCanvas = (e: any) => {
const canvasBox = () => {
const layoutDom = document.getElementById('go-chart-edit-layout')
if (layoutDom) {
//
const scrollW = 20
// 20
//
return {
height: layoutDom.clientHeight - scrollW,
width: layoutDom.clientWidth - scrollW
height: layoutDom.clientHeight - thick,
width: layoutDom.clientWidth - thick
}
}
return {
@ -188,7 +188,12 @@ const canvasPosCenter = () => {
$app.value.scrollLeft = containerWidth / 2 - width / 2
$app.value.scrollTop = containerHeight / 2 - height / 2
}
watch(scale, () => {
//
//
//
reDraw()
}, { immediate: true })
//
watch(
() => designStore.getDarkTheme,