Skip to content

Commit

Permalink
fixed double-tap zoom scale limit bug
Browse files Browse the repository at this point in the history
was capping double-tap destination scale at 1.0; this patch correctly
sets the cap at maxScale
  • Loading branch information
moagrius committed Sep 10, 2013
1 parent f09a9be commit 885063e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/qozix/layouts/ZoomPanLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ public boolean onTouchEvent( MotionEvent event ) {
if ( determineIfQualifiedDoubleTap() ) {
saveHistoricalScale();
saveDoubleTapHistory();
double destination = Math.min( 1, scale * 2 );
double destination = Math.min( maxScale, scale * 2 );
smoothScaleTo( destination, ZOOM_ANIMATION_DURATION );
for ( GestureListener listener : gestureListeners ) {
listener.onDoubleTap( actualPoint );
Expand Down

0 comments on commit 885063e

Please sign in to comment.