fix: 处理首次进来和缩放后标尺比例不正确的问题

通过监听scale的变化重绘标尺解决
This commit is contained in:
yuanxin 2023-10-19 17:24:05 +08:00
parent a34164c7d7
commit caca82eea9

View File

@ -188,7 +188,10 @@ const canvasPosCenter = () => {
$app.value.scrollLeft = containerWidth / 2 - width / 2 $app.value.scrollLeft = containerWidth / 2 - width / 2
$app.value.scrollTop = containerHeight / 2 - height / 2 $app.value.scrollTop = containerHeight / 2 - height / 2
} }
//
watch(scale, () => {
reDraw()
}, { immediate: true })
// //
watch( watch(
() => designStore.getDarkTheme, () => designStore.getDarkTheme,