fix:优化水平/垂直居中辅助线
This commit is contained in:
@@ -558,11 +558,11 @@
|
|||||||
// 检测容器中心对齐
|
// 检测容器中心对齐
|
||||||
if (Math.abs(elCenterX - cCenterX) < threshold) {
|
if (Math.abs(elCenterX - cCenterX) < threshold) {
|
||||||
snapX = true;
|
snapX = true;
|
||||||
snapXPos = cCenterX;
|
snapXPos = cCenterX - elWidth / 2;
|
||||||
}
|
}
|
||||||
if (Math.abs(elCenterY - cCenterY) < threshold) {
|
if (Math.abs(elCenterY - cCenterY) < threshold) {
|
||||||
snapY = true;
|
snapY = true;
|
||||||
snapYPos = cCenterY;
|
snapYPos = cCenterY - elHeight / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检测容器边缘对齐
|
// 检测容器边缘对齐
|
||||||
|
|||||||
Reference in New Issue
Block a user