Revert "[Layout] Layout API based on content area (#2110)"

This reverts commit 8897614f0e.
This commit is contained in:
Adlai Holler
2016-09-07 11:35:19 -07:00
parent 8897614f0e
commit 91e1bd6818
109 changed files with 1300 additions and 2085 deletions

View File

@@ -37,7 +37,9 @@ static UIColor *OverViewASPagerNodeRandomColor() {
- (ASLayout *)calculateLayoutThatFits:(ASSizeRange)constrainedSize
{
return [ASLayout layoutWithLayoutable:self size:constrainedSize.max];
return [ASLayout layoutWithLayoutableObject:self
constrainedSizeRange:constrainedSize
size:constrainedSize.max];
}
@end
@@ -67,10 +69,8 @@ static UIColor *OverViewASPagerNodeRandomColor() {
- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
{
// 100% of container
_node.width = ASDimensionMakeWithFraction(1.0);
_node.height = ASDimensionMakeWithFraction(1.0);
return [ASWrapperLayoutSpec wrapperWithLayoutable:_node];
_node.sizeRange = ASRelativeSizeRangeMakeWithExactCGSize(constrainedSize.max);
return [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[_node]];
}
- (NSInteger)numberOfPagesInPagerNode:(ASPagerNode *)pagerNode