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