From 2bae00323ce2112e281c3a14eacd6f80302dbfdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=97=A6?= Date: Sun, 29 Jun 2025 17:13:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=A9=E6=94=BE=E6=97=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=B0=8F=E8=BD=A6=E5=81=8F=E7=A7=BB=E7=9A=84=E5=83=8F?= =?UTF-8?q?=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/map/constant.ts | 2 +- src/services/editor.service.ts | 7 ++++++- 自动同步仓库.ps1 | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/apis/map/constant.ts b/src/apis/map/constant.ts index f092111..039ca35 100644 --- a/src/apis/map/constant.ts +++ b/src/apis/map/constant.ts @@ -134,7 +134,7 @@ export const EDITOR_CONFIG: Options = { /** 禁用重复线条 - 不允许在同一对点之间创建多条线 */ disableRepeatLine: true, /** 最小缩放比例 - 画布最小缩放到1% */ - minScale: 0.01, + minScale: 0.10, /** 最大缩放比例 - 画布最大缩放到401% */ maxScale: 4.01, /** 缩放步长 - 每次滚轮滚动的缩放幅度(5%) */ diff --git a/src/services/editor.service.ts b/src/services/editor.service.ts index eff62fb..fc48971 100644 --- a/src/services/editor.service.ts +++ b/src/services/editor.service.ts @@ -497,7 +497,12 @@ export class EditorService extends Meta2d { const theme = this.data().theme; const image = import.meta.env.BASE_URL + (active ? `/robot/${type}-active-${theme}.png` : `/robot/${type}-${theme}.png`); - return { image, iconWidth: 34, iconHeight: 54, iconTop: -5 }; + + // 根据当前缩放比例调整iconTop,避免15%等特定缩放下的像素对齐问题(小车和光圈没重合的问题) + const scale = this.store.data.scale || 1; + const iconTop = Math.round(-5 * scale) / scale; + + return { image, iconWidth: 34, iconHeight: 54, iconTop }; } //#endregion diff --git a/自动同步仓库.ps1 b/自动同步仓库.ps1 index 7888f7f..41b01cb 100644 --- a/自动同步仓库.ps1 +++ b/自动同步仓库.ps1 @@ -8,8 +8,8 @@ param( ) # 远程仓库配置常量 -$UPSTREAM_URL = "http://192.168.189.2:8418/amr.core/web-amr" -$ORIGIN_URL = "http://192.168.189.2:8418/xudan/web-map" +$UPSTREAM_URL = "http://82.156.39.91:8418/amr.core/web-amr" +$ORIGIN_URL = "http://82.156.39.91:8418/xudan/web-map" # 设置控制台编码以正确显示中文 [Console]::OutputEncoding = [System.Text.Encoding]::UTF8