Skip to content

Commit

Permalink
Escalate directly to yoga root rather than walking up (#1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adlai-Holler committed Dec 7, 2018
1 parent 86a853e commit bccdf83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/ASDisplayNode+Yoga.mm
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ - (void)invalidateCalculatedYogaLayout

- (void)calculateLayoutFromYogaRoot:(ASSizeRange)rootConstrainedSize
{
ASDisplayNode *yogaParent = self.yogaParent;
ASDisplayNode *yogaRoot = self.yogaRoot;

if (yogaParent) {
if (self != yogaRoot) {
ASYogaLog("ESCALATING to Yoga root: %@", self);
// TODO(appleguy): Consider how to get the constrainedSize for the yogaRoot when escalating manually.
[yogaParent calculateLayoutFromYogaRoot:ASSizeRangeUnconstrained];
[yogaRoot calculateLayoutFromYogaRoot:ASSizeRangeUnconstrained];
return;
}

Expand Down

0 comments on commit bccdf83

Please sign in to comment.