mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 709817 - Don't clobber mState if animations are aborted. r=pcwalton
Ensure that if the animation is aborted by changing the value of mState (such as if we get an onTouchStart and set the mState to TOUCHING), then we don't clobber it and set it back to NOTHING. Only set it back to NOTHING when the animation finishes normally.
This commit is contained in:
parent
36b1a1f54b
commit
a09efe8450
@ -617,6 +617,7 @@ public class PanZoomController
|
||||
/* Finally, if there's nothing else to do, complete the animation and go to sleep. */
|
||||
finishBounce();
|
||||
finishAnimation();
|
||||
mState = PanZoomState.NOTHING;
|
||||
}
|
||||
|
||||
/* Performs one frame of a bounce animation. */
|
||||
@ -684,16 +685,17 @@ public class PanZoomController
|
||||
*/
|
||||
boolean overscrolledX = mX.getOverscroll() != Axis.Overscroll.NONE;
|
||||
boolean overscrolledY = mY.getOverscroll() != Axis.Overscroll.NONE;
|
||||
if (!mOverridePanning && (overscrolledX || overscrolledY))
|
||||
if (!mOverridePanning && (overscrolledX || overscrolledY)) {
|
||||
bounce();
|
||||
else
|
||||
} else {
|
||||
finishAnimation();
|
||||
mState = PanZoomState.NOTHING;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void finishAnimation() {
|
||||
Log.d(LOGTAG, "Finishing animation at " + mController.getViewportMetrics());
|
||||
mState = PanZoomState.NOTHING;
|
||||
stopAnimationTimer();
|
||||
|
||||
// Force a viewport synchronisation
|
||||
|
Loading…
Reference in New Issue
Block a user