Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23391] : iOS View is not getting horizontally wrapped properly #8805

Merged
merged 5 commits into from
Feb 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions iphone/Classes/TiViewProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -2712,21 +2712,21 @@ -(CGRect)computeChildSandbox:(TiViewProxy*)child withBounds:(CGRect)bounds
else if (!TiDimensionIsUndefined([child layoutProperties]->left) && !TiDimensionIsUndefined([child layoutProperties]->right) ) {
recalculateWidth = YES;
followsFillBehavior = YES;
desiredWidth = [child autoWidthForSize:CGSizeMake(boundingWidth - offsetH,boundingHeight - offsetV)] + offsetH;
desiredWidth = [child autoWidthForSize:CGSizeMake(bounds.size.width - offsetH,boundingHeight - offsetV)] + offsetH;
}
else if (!TiDimensionIsUndefined([child layoutProperties]->centerX) && !TiDimensionIsUndefined([child layoutProperties]->right) ) {
desiredWidth = 2 * ( boundingWidth - TiDimensionCalculateValue([child layoutProperties]->right, boundingWidth) - TiDimensionCalculateValue([child layoutProperties]->centerX, boundingWidth));
desiredWidth += offsetH;
}
else {
recalculateWidth = YES;
desiredWidth = [child autoWidthForSize:CGSizeMake(boundingWidth - offsetH,boundingHeight - offsetV)] + offsetH;
desiredWidth = [child autoWidthForSize:CGSizeMake(bounds.size.width - offsetH,boundingHeight - offsetV)] + offsetH;
}
}
else {
//This block takes care of auto,SIZE and FILL. If it is size ensure followsFillBehavior is set to false
recalculateWidth = YES;
desiredWidth = [child autoWidthForSize:CGSizeMake(boundingWidth - offsetH,boundingHeight - offsetV)] + offsetH;
desiredWidth = [child autoWidthForSize:CGSizeMake(bounds.size.width - offsetH,boundingHeight - offsetV)] + offsetH;
if (TiDimensionIsAutoSize(constraint)) {
followsFillBehavior = NO;
} else if(TiDimensionIsAutoFill(constraint)) {
Expand Down