diff --git a/doric-iOS/Pod/Classes/Shader/DoricLayouts.m b/doric-iOS/Pod/Classes/Shader/DoricLayouts.m index 37102fa1..f69bfe9a 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricLayouts.m +++ b/doric-iOS/Pod/Classes/Shader/DoricLayouts.m @@ -443,11 +443,7 @@ - (void)layoutStack { } else if ((gravity & DoricGravityCenterX) == DoricGravityCenterX) { layout.measuredX = self.measuredWidth / 2 - layout.measuredWidth / 2; } else { - if (layout.marginLeft || layout.marginRight) { - layout.measuredX = self.paddingLeft; - } else { - layout.measuredX = 0; - } + layout.measuredX = self.paddingLeft; } if ((gravity & DoricGravityTop) == DoricGravityTop) { layout.measuredY = self.paddingTop; @@ -456,11 +452,7 @@ - (void)layoutStack { } else if ((gravity & DoricGravityCenterY) == DoricGravityCenterY) { layout.measuredY = self.measuredHeight / 2 - layout.measuredHeight / 2; } else { - if (layout.marginTop || layout.marginBottom) { - layout.measuredY = self.paddingTop; - } else { - layout.measuredY = 0; - } + layout.measuredY = self.paddingTop; } if (!gravity) {