mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 769391 - Prevent axis locking when on a page that fits the user's screen vertically or horizontally. r=kats
This commit is contained in:
parent
8a7e8c754a
commit
d9cfff8b87
@ -212,7 +212,7 @@ abstract class Axis {
|
||||
* Returns true if the page is zoomed in to some degree along this axis such that scrolling is
|
||||
* possible and this axis has not been scroll locked while panning. Otherwise, returns false.
|
||||
*/
|
||||
private boolean scrollable() {
|
||||
boolean scrollable() {
|
||||
// If we're scrolling a subdocument, ignore the viewport length restrictions (since those
|
||||
// apply to the top-level document) and only take into account axis locking.
|
||||
if (mSubscroller.scrolling()) {
|
||||
|
@ -493,7 +493,9 @@ public class PanZoomController
|
||||
mY.startTouch(y);
|
||||
mLastEventTime = time;
|
||||
|
||||
if (angle < AXIS_LOCK_ANGLE || angle > (Math.PI - AXIS_LOCK_ANGLE)) {
|
||||
if (!mX.scrollable() || !mY.scrollable()) {
|
||||
setState(PanZoomState.PANNING);
|
||||
} else if (angle < AXIS_LOCK_ANGLE || angle > (Math.PI - AXIS_LOCK_ANGLE)) {
|
||||
mY.setScrollingDisabled(true);
|
||||
setState(PanZoomState.PANNING_LOCKED);
|
||||
} else if (Math.abs(angle - (Math.PI / 2)) < AXIS_LOCK_ANGLE) {
|
||||
|
Loading…
Reference in New Issue
Block a user