fix:优化水平/垂直居中辅助线

This commit is contained in:
Zhukj
2026-04-17 09:16:29 +08:00
parent dfd0528151
commit 56d2e45895

View File

@@ -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;
}
// 检测容器边缘对齐