Skip to content

Commit

Permalink
reset zoom level on orientation change
Browse files Browse the repository at this point in the history
  • Loading branch information
tibbi committed Feb 4, 2018
1 parent 6d880a6 commit 1cbf04c
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -609,12 +609,9 @@ public boolean onSingleTapConfirmed(MotionEvent e) {
*/
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
debug("onSizeChanged %dx%d -> %dx%d", oldw, oldh, w, h);
PointF sCenter = getCenter();
if (readySent && sCenter != null) {
this.anim = null;
this.pendingScale = scale;
this.sPendingCenter = sCenter;
super.onSizeChanged(w, h, oldw, oldh);
if(oldh != 0 && oldw != 0) {
resetScaleAndCenter();
}
}

Expand Down

0 comments on commit 1cbf04c

Please sign in to comment.