Fix issue where absolute children of row-reverse containers would inset on the wrong side (#1446)
Summary: X-link: https://github.com/facebook/react-native/pull/41293 Pull Request resolved: https://github.com/facebook/yoga/pull/1446 NickGerleman pointed out that my recent changes to fix the slew of row-reverse problems in Yoga actually ended up regressing some parts. Specifically, absolute children of row-reverse containers would have their insets set to the wrong side. So if you set left: 10 it would apply it to the right. Turns out, in `layoutAbsoluteChild` there were cases where we were applying inlineStart/End values to the flexStart/End edge, which can never be right. So I changed the values to also be flexStart/End as the fix here. Reviewed By: NickGerleman Differential Revision: D50945475 fbshipit-source-id: 290de06dcc04e8e644a3a32c127af12fdabb2f75
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c09554056d
commit
283e3203f6
@@ -199,22 +199,28 @@ class YG_EXPORT Node : public ::YGNode {
|
||||
YGEdge edge);
|
||||
|
||||
// Methods related to positions, margin, padding and border
|
||||
bool isFlexStartPositionDefined(FlexDirection axis) const;
|
||||
bool isInlineStartPositionDefined(FlexDirection axis, Direction direction)
|
||||
const;
|
||||
bool isFlexEndPositionDefined(FlexDirection axis) const;
|
||||
bool isInlineEndPositionDefined(FlexDirection axis, Direction direction)
|
||||
const;
|
||||
float getFlexStartPosition(FlexDirection axis, float axisSize) const;
|
||||
float getInlineStartPosition(
|
||||
FlexDirection axis,
|
||||
Direction direction,
|
||||
float axisSize) const;
|
||||
float getFlexEndPosition(FlexDirection axis, float axisSize) const;
|
||||
float getInlineEndPosition(
|
||||
FlexDirection axis,
|
||||
Direction direction,
|
||||
float axisSize) const;
|
||||
float getFlexStartMargin(FlexDirection axis, float widthSize) const;
|
||||
float getInlineStartMargin(
|
||||
FlexDirection axis,
|
||||
Direction direction,
|
||||
float widthSize) const;
|
||||
float getFlexEndMargin(FlexDirection axis, float widthSize) const;
|
||||
float getInlineEndMargin(
|
||||
FlexDirection axis,
|
||||
Direction direction,
|
||||
|
Reference in New Issue
Block a user