Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63814df6 authored by Adam Powell's avatar Adam Powell
Browse files

Smooth out gesture zooming in WebViews.

Change-Id: I42c1182f82af3ed16cd23efc056d7c9c34e32940
parent 45f1e08c
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -673,10 +673,9 @@ class ZoomManager {

        public boolean onScale(ScaleGestureDetector detector) {
            // Prevent scaling beyond overview scale.
            float scale = Math.max(
                Math.round(detector.getScaleFactor() * mActualScale * 100) * 0.01f,
            float scale = Math.max(detector.getScaleFactor() * mActualScale,
                    getZoomOverviewScale());
            if (willScaleTriggerZoom(scale)) {
            if (mPinchToZoomAnimating || willScaleTriggerZoom(scale)) {
                mPinchToZoomAnimating = true;
                // limit the scale change per step
                if (scale > mActualScale) {