From 3deed5636345a7ca354e81d9075cf2660d7a5817 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:54:33 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20padding=E6=8C=87=E5=AE=9A=E6=99=82?= =?UTF-8?q?=E3=81=AEtop=E5=BA=A7=E6=A8=99=E8=A8=88=E7=AE=97=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/scripts/watermark.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/scripts/watermark.ts b/packages/frontend/src/scripts/watermark.ts index 0fccf32f83..1f8d5d1c07 100644 --- a/packages/frontend/src/scripts/watermark.ts +++ b/packages/frontend/src/scripts/watermark.ts @@ -162,11 +162,11 @@ export async function applyWatermark(img: string | Blob, el: HTMLCanvasElement, case 'center': case 'left': case 'right': - return (canvas.height - height) / 2 + (config.padding ? config.padding.top ?? 0 : 0); + return (canvas.height - height) / 2; case 'top': case 'top-left': case 'top-right': - return rotateY; + return rotateY + (config.padding ? config.padding.top ?? 0 : 0); case 'bottom': case 'bottom-left': case 'bottom-right':