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

Not showing complete picture after zoom. #97

Closed
hshrimali opened this issue Mar 17, 2017 · 6 comments
Closed

Not showing complete picture after zoom. #97

hshrimali opened this issue Mar 17, 2017 · 6 comments

Comments

@hshrimali
Copy link
Contributor

After complete zoom of a picture, when we swipe left to see till the right most part of the image, it just changes the picture instead of showing the right part of the picture which I think should not happen.

@csoni111
Copy link
Member

I don't think so this is the case. It works fine for me. Here is the code that disallows the view pager to change the image while there is some portion of the image still left to display. I have kept the difference between Maximum translation possible in X and Current translation in X as 0.5, for the check to enable the ViewPager to change the image. Keeping it to 0 would result in another problem as one may not be able to reach the exact boundary.

I had wasted hours to figure it out initially while implementing this but now according to me it works fine.

@csoni111
Copy link
Member

Can you attach a screenshot of the zoomed in image while swiping left (and the ViewPager changing the image) and also the original image (with no zoom)? So that the issue can be clearly understood!

@hshrimali
Copy link
Contributor Author

@csoni111 app is still showing the Connection Error problem. So, I can't enter that image folder to show you the screenshot. As soon as the connection comes I will send you the screenshot

@hshrimali
Copy link
Contributor Author

Okay @csoni111 Look at the screenshots.

The below one is while trying to see till the right most part of the picture but it changed.

screenshot_20170319-171523

And this one is the complete first picture

screenshot_20170319-171537

@csoni111
Copy link
Member

@hshrimali I cannot reproduce this! But if you are facing such an issue then there must be something that I might have overlooked in the code.

Can you please debug the code? You just have to log the values of absTransX (this is the current absolute translation in X direction) and transXMax (this is the maximum translation possible till the complete image is shown). You will find these two variables here.

Now for the correct functionality, until the abxTransX reaches the transXMax (ie the extreme part of the image is displayed) the touch event interception by the viewpager must be disallowed. Disallowing the view pager to intercept the touch event will not allow it to change the image and so the image will be scrolled inside the current frame only.

So after logging the values please check if this functionality is maintained in your case. I hope all this is understandable!

Also anyone else if facing this issue, please comment!

@cpg
Copy link
Member

cpg commented Mar 21, 2017

I cannot reproduce it either.

@cpg cpg closed this as completed Mar 21, 2017
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

No branches or pull requests

3 participants