From 5dd5e003b1b0551e7fb87859da7da2b96b6f2132 Mon Sep 17 00:00:00 2001 From: kylehue Date: Thu, 28 Mar 2024 23:13:40 +0800 Subject: [PATCH] fix: center position origin --- src/designer/Designer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/designer/Designer.ts b/src/designer/Designer.ts index c9da1f0..390a36b 100644 --- a/src/designer/Designer.ts +++ b/src/designer/Designer.ts @@ -275,16 +275,16 @@ export class Designer { switch (material.getPositionOrigin()) { case "top": - y += height / 2 - tileSize / 2; + y += height / 2; break; case "bottom": - y -= height / 2 - tileSize / 2; + y -= height / 2; break; case "right": - x -= width / 2 - tileSize / 2; + x -= width / 2; break; case "left": - x += width / 2 - tileSize / 2; + x += width / 2; break; }