Skip to content

Commit

Permalink
Fix absolute position if wrap-reverse and align-items: flex-end
Browse files Browse the repository at this point in the history
Summary:
This is a fix on top of 56b10fc. It takes the case into account were you have `wrap-reverse` and `align-items: flex-end` set.
Closes facebook/yoga#568

Differential Revision: D5155521

Pulled By: emilsjolander

fbshipit-source-id: 7e5fcfa2fbb48b6c6279da46cc648a071ff2b079
  • Loading branch information
woehrl01 authored and facebook-github-bot committed Jun 1, 2017
1 parent c57545e commit 7c980c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ReactCommon/yoga/yoga/Yoga.c
Expand Up @@ -1714,7 +1714,7 @@ static void YGNodeAbsoluteLayoutChild(const YGNodeRef node,
child->layout.measuredDimensions[dim[crossAxis]]) / child->layout.measuredDimensions[dim[crossAxis]]) /
2.0f; 2.0f;
} else if (!YGNodeIsLeadingPosDefined(child, crossAxis) && } else if (!YGNodeIsLeadingPosDefined(child, crossAxis) &&
(YGNodeAlignItem(node, child) == YGAlignFlexEnd || node->style.flexWrap == YGWrapWrapReverse)) { ((YGNodeAlignItem(node, child) == YGAlignFlexEnd) ^ (node->style.flexWrap == YGWrapWrapReverse))) {
child->layout.position[leading[crossAxis]] = (node->layout.measuredDimensions[dim[crossAxis]] - child->layout.position[leading[crossAxis]] = (node->layout.measuredDimensions[dim[crossAxis]] -
child->layout.measuredDimensions[dim[crossAxis]]); child->layout.measuredDimensions[dim[crossAxis]]);
} }
Expand Down

0 comments on commit 7c980c5

Please sign in to comment.