Skip to content

Commit

Permalink
-Fixed flipping image on quickscaling when ScaleGestureDetector retur…
Browse files Browse the repository at this point in the history
…ns scale factor below zero
  • Loading branch information
xd720p committed Nov 28, 2018
1 parent 0564bde commit a84eba1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ public boolean onScale(ScaleGestureDetector detector) {

if (Float.isNaN(scaleFactor) || Float.isInfinite(scaleFactor))
return false;

mListener.onScale(scaleFactor,
detector.getFocusX(), detector.getFocusY());
if (scaleFactor >= 0) {
mListener.onScale(scaleFactor,
detector.getFocusX(), detector.getFocusY());
}
return true;
}

Expand Down

0 comments on commit a84eba1

Please sign in to comment.