Fix bug with align start not taking into account parent padding (#1484)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1484 X-link: https://github.com/facebook/react-native/pull/41687 Tsia. Added test and accounted for parent padding Reviewed By: NickGerleman Differential Revision: D51374086 fbshipit-source-id: ed9d79887aa1613ea93c10c639cd1465271d23d8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a5c955a579
commit
d1dda2185e
@@ -72,7 +72,8 @@ static void alignAbsoluteChild(
|
||||
case Align::Stretch:
|
||||
case Align::SpaceEvenly:
|
||||
child->setLayoutPosition(
|
||||
parent->getFlexStartBorder(crossAxis, direction) +
|
||||
parent->getLayout().border(flexStartEdge(crossAxis)) +
|
||||
parent->getLayout().padding(flexStartEdge(crossAxis)) +
|
||||
child->getFlexStartMargin(
|
||||
crossAxis, direction, containingBlockWidth),
|
||||
flexStartEdge(crossAxis));
|
||||
|
Reference in New Issue
Block a user