Skip to content

Commit f75e21f

Browse files
call margin method on child instead of node
Reviewed By: emilsjolander Differential Revision: D6918367 fbshipit-source-id: cee90e015f9e45a717a7307f59fd3b9ef6f399b6
1 parent 09b43e4 commit f75e21f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ReactCommon/yoga/yoga/Yoga.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -1037,9 +1037,9 @@ static void YGNodeComputeFlexBasisForChild(const YGNodeRef node,
10371037
childHeightMeasureMode = YGMeasureModeUndefined;
10381038

10391039
const float marginRow =
1040-
node->getMarginForAxis(YGFlexDirectionRow, parentWidth);
1040+
child->getMarginForAxis(YGFlexDirectionRow, parentWidth);
10411041
const float marginColumn =
1042-
node->getMarginForAxis(YGFlexDirectionColumn, parentWidth);
1042+
child->getMarginForAxis(YGFlexDirectionColumn, parentWidth);
10431043

10441044
if (isRowStyleDimDefined) {
10451045
childWidth =
@@ -2624,9 +2624,8 @@ static void YGNodelayoutImpl(const YGNodeRef node,
26242624
}
26252625
if (child->getStyle().positionType == YGPositionTypeAbsolute) {
26262626
// If the child is absolutely positioned and has a
2627-
// top/left/bottom/right
2628-
// set, override all the previously computed positions to set it
2629-
// correctly.
2627+
// top/left/bottom/right set, override
2628+
// all the previously computed positions to set it correctly.
26302629
const bool isChildLeadingPosDefined =
26312630
child->isLeadingPositionDefined(crossAxis);
26322631
if (isChildLeadingPosDefined) {

0 commit comments

Comments
 (0)