Merge remote-tracking branch 'origin/StableVersion' into dev_vite

This commit is contained in:
X1627315083
2025-09-25 15:14:27 +08:00
13 changed files with 118 additions and 97 deletions

View File

@@ -468,7 +468,6 @@ onMounted(async () => {
// 使用window的resize事件代替ResizeObserver
// 只有当窗口大小变化时才更新画布尺寸
// window.addEventListener("resize", handleWindowResize);
if(props.config.initZoom) {
const width = canvasManager.width;
const height = canvasManager.height;
@@ -547,6 +546,10 @@ function setZoom(zoom) {
if (!canvasManager) return;
const newZoom = Math.max(zoom, 0.1); // 最小0.1倍
function setZoom(zoom) {
setTimeout(()=>{
if (!canvasManager) return;
const newZoom = Math.max(zoom, 0.1); // 减少10%最小0.1倍
// 使用画布中心作为缩放点
const centerPoint = {
x: canvasManager.canvas.width / 2,
@@ -556,6 +559,7 @@ function setZoom(zoom) {
canvasManager.animateZoom(centerPoint, newZoom);
})
}
function zoomIn() {
if (!canvasManager) return;