mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-13 22:12:11 +08:00
fix: 处理首次进来和缩放后标尺比例不正确的问题
通过监听scale的变化重绘标尺解决
This commit is contained in:
parent
a34164c7d7
commit
caca82eea9
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user