Bug 693481 - Updated ReaderView.java for scrolling in the scaling/pinch zooming
Summary: Updated ReaderView.java for scrolling in the scaling/pinch zooming
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: master
Hardware: Android Phone Android
: P4 enhancement
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-30 22:20 UTC by Kenny Lam
Modified: 2015-04-03 07:44 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
The updated ReaderView with support of scrolling when scaling (17.42 KB, application/octet-stream)
2012-11-30 22:21 UTC, Kenny Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
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!