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-13243] handle centering on scroll view content changes #4063

Closed
wants to merge 2 commits into from
Closed

[TIMOB-13243] handle centering on scroll view content changes #4063

wants to merge 2 commits into from

Conversation

mstepanov
Copy link
Contributor

@vishalduggal
Copy link
Contributor

In the scrollViewDidZoom method we have the following condition

if (TiDimensionIsAuto(contentWidth) || TiDimensionIsAutoSize(contentWidth))

This should also check for TiDimensionIsUndefined since in that case we follow the SIZE behavior. The same applies to the contentHeight dimension.

@@ -199,6 +199,7 @@ -(void)handleContentSize
wrapperBounds.origin = CGPointZero;
wrapperBounds.size = newContentSize;
[wrapperView setFrame:wrapperBounds];
[self scrollViewDidZoom:scrollView];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call should be made after layoutChildren to ensure that the wrapperView frame is correctly calculated and we center correctly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore.

@vishalduggal
Copy link
Contributor

Code Reviewed. Please address comments.

@ghost ghost assigned srahim and vishalduggal Apr 3, 2013
@vishalduggal
Copy link
Contributor

Code Reviewed. ACCEPTED

@vishalduggal
Copy link
Contributor

FR failed. Does not work when image size is smaller than window size (ie minZoomScale and zoomscale > 1)

@vishalduggal
Copy link
Contributor

New PR #4177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants