Skip to content

Commit

Permalink
Set hasNewLayout on children when changing their layout due to displa…
Browse files Browse the repository at this point in the history
…y none parent

Summary: Mark nodes as having a new layout when changing display to none recursively.

Reviewed By: astreet

Differential Revision: D4786615

fbshipit-source-id: 2f3a16661d37bc37939e8e7a551445886a06524e
  • Loading branch information
Emil Sjolander authored and facebook-github-bot committed Mar 28, 2017
1 parent 36f6fa9 commit ebdf82f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions yoga/Yoga.c
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,7 @@ static void YGZeroOutLayoutRecursivly(const YGNodeRef node) {
node->layout.cachedLayout.widthMeasureMode = YGMeasureModeExactly;
node->layout.cachedLayout.computedWidth = 0;
node->layout.cachedLayout.computedHeight = 0;
node->hasNewLayout = true;
const uint32_t childCount = YGNodeGetChildCount(node);
for (uint32_t i = 0; i < childCount; i++) {
const YGNodeRef child = YGNodeListGet(node->children, i);
Expand Down

0 comments on commit ebdf82f

Please sign in to comment.