bookreader icon indicating copy to clipboard operation
bookreader copied to clipboard

Error resolved of zoom in.

Open Ayush32-ai opened this issue 4 months ago • 5 comments

Key Features & Implementation

This PR updates the zoomIn() method in Mode1UpLit so that when the zoom level exceeds 2.0, the view automatically recenters on the current page, matching the behavior in jumpToIndex() for high zoom navigation. This improves the reading experience by preventing the page from drifting off-center when incrementally zooming in.

Changes

Updated zoomIn() to:

Detect when the new zoom level is greater than 2.0.

Call jumpToIndex() for the first visible page after zoom to re-center it.

Keeps existing throttled updates to rendered pages and visible region refresh.

Ensures behavior is consistent between high zoom page jumps and zoom button presses.

Reasoning Previously, zooming in at high zoom levels would not adjust the scroll position, causing the target page to shift out of center view. This was inconsistent with the jumpToIndex() behavior and made fine zoom adjustments frustrating.

Testing

Opened a book in Mode1Up view.

Zoomed in past 2.0 scale using the zoom button.

Confirmed that the current page remains centered after each click.

Verified normal zoom (< 2.0) behavior is unaffected.

Impact Improves usability for readers who prefer high magnification by keeping their focus point stable when zooming in.

Ayush32-ai avatar Aug 16 '25 05:08 Ayush32-ai

@cdrini please review it.

Ayush32-ai avatar Aug 17 '25 09:08 Ayush32-ai

@cdrini please review it.

Ayush32-ai avatar Aug 18 '25 10:08 Ayush32-ai

@rchrd2 Please review it.

Ayush32-ai avatar Aug 20 '25 17:08 Ayush32-ai

@cdrini please review the code

Ayush32-ai avatar Sep 11 '25 19:09 Ayush32-ai

@cdrini please review the code

Ayush32-ai avatar Sep 18 '25 11:09 Ayush32-ai