ASDisplayNode returns requestedLayoutSize by default

This commit is contained in:
ricky cancro 2015-08-04 08:12:32 -07:00
parent 496cc43337
commit c03ed9a8f4

View File

@ -1308,7 +1308,7 @@ static NSInteger incrementIfFound(NSInteger i) {
- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize - (CGSize)calculateSizeThatFits:(CGSize)constrainedSize
{ {
ASDisplayNodeAssertThreadAffinity(self); ASDisplayNodeAssertThreadAffinity(self);
return CGSizeZero; return CGSizeMake(MIN(self.requestedLayoutSize.width, constrainedSize.width), MIN(self.requestedLayoutSize.height, constrainedSize.height));
} }
- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize - (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize