Skip to content

Conversation

@Ayush32-ai
Copy link

@Ayush32-ai Ayush32-ai commented Aug 16, 2025

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
Copy link
Author

@cdrini please review it.

@Ayush32-ai Ayush32-ai changed the title Error resolved of zoom in and also add multilangual Error resolved of zoom in. Aug 17, 2025
@Ayush32-ai
Copy link
Author

@cdrini please review it.

@Ayush32-ai
Copy link
Author

@rchrd2 Please review it.

@Ayush32-ai
Copy link
Author

@cdrini please review the code

1 similar comment
@Ayush32-ai
Copy link
Author

@cdrini please review the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant