зеркало из https://github.com/mozilla/gecko-dev.git
Bug 701594 - Snap back if you zoom out further than the page size. r=pcwalton
This commit is contained in:
Родитель
2707eda099
Коммит
feb9c86acb
|
@ -584,6 +584,14 @@ public class PanZoomController
|
|||
mLastTimestamp = System.currentTimeMillis();
|
||||
mX.touchPos = detector.getFocusX();
|
||||
mY.touchPos = detector.getFocusY();
|
||||
|
||||
RectF visible = mController.getVisibleRect();
|
||||
IntSize pageSize = mController.getPageSize();
|
||||
RectF pageRect = new RectF(0,0, pageSize.width, pageSize.height);
|
||||
if (!pageRect.contains(visible)) {
|
||||
RectF rect = mController.clampToScreenSize(visible);
|
||||
animatedZoomTo(rect.left, rect.top, rect.width(), rect.height(), 200);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Загрузка…
Ссылка в новой задаче