Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure pan zoom mode on document open #11425

Merged
merged 5 commits into from Feb 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/apps/reader/modules/readerview.lua
Expand Up @@ -695,7 +695,7 @@ function ReaderView:recalculate()
-- start from right of page_area
self.visible_area.x = self.page_area.x + self.page_area.w - self.visible_area.w
end
if self.ui.zooming.zoom_bottom_to_top then
if self.document.configurable.zoom_direction >= 2 and self.document.configurable.zoom_direction <= 5 then -- zoom_bottom_to_top
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this doesn't look too bad :)
A bit sad to put here some logic (about configurable.zoom_direction) that should better be only in ReaderZooming (I guess you do that because ReaderZooming may not yet be available), but it looks like we already do the same kind of thing just above for configurable.writing_direction, so the sadness feels a bit consistent and we'll soon forget about it :)

-- starts from bottom of page_area
self.visible_area.y = self.page_area.y + self.page_area.h - self.visible_area.h
else
Expand Down