Skip to content

Commit

Permalink
Set web defaults when resetting
Browse files Browse the repository at this point in the history
Reviewed By: astreet

Differential Revision: D4779742

fbshipit-source-id: 5b8c5d7bd432a12984e4ebfd3187da3d680272cd
  • Loading branch information
Emil Sjolander authored and thotegowda committed May 7, 2017
1 parent e6a1e1f commit 361e5b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ReactCommon/yoga/yoga/Yoga.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ void YGNodeReset(const YGNodeRef node) {

const YGConfigRef config = node->config;
memcpy(node, &gYGNodeDefaults, sizeof(YGNode));
if (config->useWebDefaults) {
node->style.flexDirection = YGFlexDirectionRow;
node->style.alignContent = YGAlignStretch;
}
node->config = config;
}

Expand Down

0 comments on commit 361e5b5

Please sign in to comment.