Do not round when resolving relative dimensions

When laying out a node I got to a point where the constrained width was min 132.22222pts and max width was 100%. When resolving the relative size to pts it rounded to 132pt. This caused an assert in ASSizeRangeMake because the min width (132.222pt) was bigger than the max width (132pt)
This commit is contained in:
rcancro
2015-12-17 15:20:40 -08:00
parent 0cc229d38d
commit c6f4aff4ef

View File

@@ -57,7 +57,7 @@ CGFloat ASRelativeDimensionResolve(ASRelativeDimension dimension, CGFloat parent
case ASRelativeDimensionTypePoints:
return dimension.value;
case ASRelativeDimensionTypePercent:
return round(dimension.value * parent);
return dimension.value * parent;
}
}