diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java b/src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java index eff1dd3..94bff44 100644 --- a/src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java +++ b/src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java @@ -127,11 +127,11 @@ public class ImageViewTouch extends ImageViewTouchBase { if ( mDoubleTapDirection == 1 ) { if (mCurrentScaleFactor - 1.0f < 0.01) { //( scale + ( mScaleFactor * 2 ) ) <= maxZoom - float w = getDrawable().getIntrinsicWidth() * mCurrentScaleFactor; + float w = getBitmapRect().right - getBitmapRect().left; float scaleFactor = mScaleFactor; if (w < getWidth()) { - scaleFactor = (getWidth() / w) - 1f + 0.1f; + scaleFactor = (float)getWidth() / (float)w - scale; } return scale + scaleFactor; |