Skip to content

Fix #canScroll when image.width < view.width #90

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix #canScroll when image.width < view.width
  • Loading branch information
Tomasz Jan Góralczyk committed Jul 24, 2016
commit ca3141e3b781df08e6bf14f8bf457f26beeb57d9
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ public boolean canScroll(int direction) {
return false;
}

if (bitmapRect.width() < imageViewRect.width()) {
return false;
}

if (bitmapRect.right >= imageViewRect.right) {
if (direction < 0) {
return Math.abs(bitmapRect.right - imageViewRect.right) > SCROLL_DELTA_THRESHOLD;
Expand Down