Bug 693481

Summary: Updated ReaderView.java for scrolling in the scaling/pinch zooming
Product: MuPDF Reporter: Kenny Lam <kennylam777>
Component: mupdfAssignee: MuPDF bugs <mupdf-bugs>
Status: RESOLVED FIXED    
Severity: enhancement CC: robin.watts
Priority: P4    
Version: master   
Hardware: Android Phone   
OS: Android   
Customer: Word Size: ---
Attachments: The updated ReaderView with support of scrolling when scaling

Description Kenny Lam 2012-11-30 22:20:39 UTC
Thanks for you guys's efforts, muPDF rocks!

I had made some little enhancement in the Android version of muPDF,which enable to  made scrolling when using two fingers, so that the control will be closer to using WebView.

The changes were only made in the com.artifex.mupdf.ReaderView (modified file attached)

2 global variables were added at line 57-58:
float mLastScaleFocusX
float mLastScaleFocusX;

2 methods were altered:

line 236-261: public boolean onScale(ScaleGestureDetector detector) {}
the changes of focus is now accounted

line 277-280public void onScaleEnd(ScaleGestureDetector detector) {}
reset the focused X/Y

That's all
Comment 1 Kenny Lam 2012-11-30 22:21:31 UTC
Created attachment 9116 [details]
The updated ReaderView with support of scrolling when scaling
Comment 2 Robin Watts 2015-04-03 07:44:33 UTC
Fixed in:

commit 57121ca1cc81b502f3a4a0f79759404d0fb0d846
Author: Robin Watts <robin.watts@artifex.com>
Date:   Fri Apr 3 14:48:38 2015 +0100

    Bug 693481: Android: Allow panning while zooming

    Adopt (slightly modified) version of Kenny Lam's patch to allow
    panning while zooming. This more closely matches how a web view
    behaves.

Thanks!