From f6cebf903d2463727ff7602210f1fa7ed16c1c54 Mon Sep 17 00:00:00 2001 From: xudan Date: Mon, 1 Dec 2025 15:57:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor(editor-drawers):=20=E5=87=8F=E5=B0=8F?= =?UTF-8?q?=E9=97=A8=E5=9B=BE=E6=A0=87=E5=86=85=E8=BE=B9=E8=B7=9D=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E8=8C=83=E5=9B=B4=EF=BC=8C=E4=BC=98=E5=8C=96=E5=B0=8F?= =?UTF-8?q?=E5=B0=BA=E5=AF=B8=E5=8C=BA=E5=9F=9F=E7=9A=84=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/editor/editor-drawers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/editor/editor-drawers.ts b/src/services/editor/editor-drawers.ts index fbf20b3..6fbb793 100644 --- a/src/services/editor/editor-drawers.ts +++ b/src/services/editor/editor-drawers.ts @@ -315,7 +315,7 @@ export function drawArea(ctx: CanvasRenderingContext2D, pen: MapPen): void { const deviceStatus = (pen.area as any)?.deviceStatus; const img = isConnected === false ? __doorImgClosed : deviceStatus === 1 ? __doorImgOpen : __doorImgClosed; if (img && img.complete) { - const padding = Math.max(6, Math.min(20, Math.min(w, h) * 0.08)); + const padding = Math.max(2, Math.min(10, Math.min(w, h) * 0.02)); const availW = Math.max(0, w - padding * 2); const availH = Math.max(0, h - padding * 2); const ratio = img.naturalWidth > 0 && img.naturalHeight > 0 ? img.naturalWidth / img.naturalHeight : 1;