Skip to content

Commit

Permalink
Merge pull request #8805 from vijaysingh-axway/TIMOB-23391
Browse files Browse the repository at this point in the history
[TIMOB-23391] : iOS View is not getting horizontally wrapped properly
  • Loading branch information
ewieberappc committed Feb 15, 2017
2 parents 28c464a + 757884b commit c3c55d3
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit c3c55d3

Please sign in to comment.