mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 711453 - Avoid potentially corrupting the fling velocity. r=pcwalton
This commit is contained in:
parent
1925b6adfa
commit
0b7c833306
@ -402,6 +402,12 @@ public class PanZoomController
|
||||
}
|
||||
|
||||
private void track(float x, float y, float lastX, float lastY, float timeDelta) {
|
||||
if (FloatUtils.fuzzyEquals(timeDelta, 0)) {
|
||||
// probably a duplicate event, ignore it. using a zero timeDelta will mess
|
||||
// up our velocity
|
||||
return;
|
||||
}
|
||||
|
||||
if (mState == PanZoomState.PANNING_LOCKED) {
|
||||
// check to see if we should break the axis lock
|
||||
double angle = Math.atan2(y - mY.firstTouchPos, x - mX.firstTouchPos); // range [-pi, pi]
|
||||
|
Loading…
Reference in New Issue
Block a user