From 56d2e458952b3e7374b3cb1cea7b679b7cd7ac0a Mon Sep 17 00:00:00 2001 From: Zhukj <3262118957> Date: Fri, 17 Apr 2026 09:16:29 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BC=98=E5=8C=96=E6=B0=B4?= =?UTF-8?q?=E5=B9=B3/=E5=9E=82=E7=9B=B4=E5=B1=85=E4=B8=AD=E8=BE=85?= =?UTF-8?q?=E5=8A=A9=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/script.js b/js/script.js index a8d429a..effb916 100644 --- a/js/script.js +++ b/js/script.js @@ -558,11 +558,11 @@ // 检测容器中心对齐 if (Math.abs(elCenterX - cCenterX) < threshold) { snapX = true; - snapXPos = cCenterX; + snapXPos = cCenterX - elWidth / 2; } if (Math.abs(elCenterY - cCenterY) < threshold) { snapY = true; - snapYPos = cCenterY; + snapYPos = cCenterY - elHeight / 2; } // 检测容器边缘对齐