Skip to content

Commit

Permalink
Escalate directly to yoga root rather than walking up (TextureGroup#1269
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Adlai-Holler authored and wsdwsd0829 committed Mar 15, 2019
1 parent b1deb9b commit 337ff50
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 337ff50

Please sign in to comment.