mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASRelativeLayoutSpec] Fix ASRelatativeLayoutSpec behavior for ASRelativeLayoutSpecPositionStart (#2393)
* Fix ASRelatativeLayoutSpec behavior for ASRelativeLayoutSpecPositionStart * Add updated images for snapshot tests
This commit is contained in:
committed by
Adlai Holler
parent
5a8d0037ec
commit
ba80b83695
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user