From 4cbc6d1897aae063815fac50ac20fbcb16796300 Mon Sep 17 00:00:00 2001 From: xudan Date: Fri, 15 Aug 2025 11:20:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E6=9C=80=E5=B0=8F=E7=BC=A9=E6=94=BE=E6=AF=94=E4=BE=8B=E8=87=B3?= =?UTF-8?q?0.04=EF=BC=8C=E5=B9=B6=E6=9B=B4=E6=96=B0=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=BA=BA=E5=9B=BE=E6=A0=87=E5=B0=BA=E5=AF=B8=E4=BB=A5=E6=94=B9?= =?UTF-8?q?=E5=96=84=E8=A7=86=E8=A7=89=E6=95=88=E6=9E=9C?= 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 | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apis/map/constant.ts b/src/apis/map/constant.ts index 09b4314..4819e30 100644 --- a/src/apis/map/constant.ts +++ b/src/apis/map/constant.ts @@ -154,7 +154,7 @@ export const EDITOR_CONFIG: Options = { /** 禁用重复线条 - 不允许在同一对点之间创建多条线 */ disableRepeatLine: true, /** 最小缩放比例 - 画布最小缩放到1% */ - minScale: 0.01, + minScale: 0.04, /** 最大缩放比例 - 画布最大缩放到401% */ maxScale: 4.01, /** 缩放步长 - 每次滚轮滚动的缩放幅度(2%) */ diff --git a/src/services/editor.service.ts b/src/services/editor.service.ts index f793371..f4da0b3 100644 --- a/src/services/editor.service.ts +++ b/src/services/editor.service.ts @@ -868,8 +868,8 @@ export class EditorService extends Meta2d { tags: ['robot'], x: 0, y: 0, - width: 74, - height: 74, + width: 120, + height: 120, lineWidth: 1, robot: { type }, visible: false, @@ -890,8 +890,8 @@ export class EditorService extends Meta2d { if (!robot?.type) return; const { x: ox, y: oy } = this.getPenRect(pen!); const { x: cx = 37, y: cy = 37, active, angle, path: points, isWaring, isFault } = info; - const x = cx - 37; - const y = cy - 37; + const x = cx - 60; + const y = cy - 60; const rotate = angle ?? or; const path = points?.map((p) => ({ x: p.x - cx, y: p.y - cy })) ?? @@ -918,7 +918,7 @@ export class EditorService extends Meta2d { // 使用优化的像素对齐算法,确保小车和光圈精确重合 const iconTop = this.#calculatePixelAlignedOffset(-10); - return { image, iconWidth: 34, iconHeight: 54, iconTop }; + return { image, iconWidth: 37, iconHeight: 54, iconTop }; } //#endregion