Escalate directly to yoga root rather than walking up (#1269)

This commit is contained in:
Adlai Holler 2018-12-07 13:12:57 -08:00 committed by GitHub
parent 86a853ea09
commit bccdf83d2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,12 +268,12 @@
- (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;
}