[ASRelativeLayoutSpec] Fix ASRelatativeLayoutSpec behavior for ASRelativeLayoutSpecPositionStart (#2393)

* Fix ASRelatativeLayoutSpec behavior for ASRelativeLayoutSpecPositionStart

* Add updated images for snapshot tests
This commit is contained in:
Michael Schneider
2016-10-18 12:00:01 -07:00
committed by Adlai Holler
parent 5a8d0037ec
commit ba80b83695
35 changed files with 55 additions and 55 deletions

View File

@@ -60,15 +60,15 @@
- (ASLayout *)calculateLayoutThatFits:(ASSizeRange)constrainedSize
{
std::vector<CGSize> sizeOptions;
// TODO: layout: isValidForLayout() call should not be necessary if INFINITY is used
if (!isinf(constrainedSize.max.width) && ASPointsValidForLayout(constrainedSize.max.width)) {
if (ASPointsValidForSize(constrainedSize.max.width)) {
sizeOptions.push_back(ASSizeRangeClamp(constrainedSize, {
constrainedSize.max.width,
ASFloorPixelValue(_ratio * constrainedSize.max.width)
}));
}
// TODO: layout: isValidForLayout() call should not be necessary if INFINITY is used
if (!isinf(constrainedSize.max.height) && ASPointsValidForLayout(constrainedSize.max.width)) {
if (ASPointsValidForSize(constrainedSize.max.width)) {
sizeOptions.push_back(ASSizeRangeClamp(constrainedSize, {
ASFloorPixelValue(constrainedSize.max.height / _ratio),
constrainedSize.max.height