Skip to content

Commit

Permalink
ReaderView: ensure pan zoom mode on document open (#11425)
Browse files Browse the repository at this point in the history
When we open the document for the first time, the pan
positions are not being applied. If I use the bottom-to-top
mode we should see the bottom first, but the top is being
shown instead.
  • Loading branch information
hugleo committed Feb 17, 2024
1 parent ef0077d commit 52fae11
Showing 1 changed file with 1 addition and 1 deletion.
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
-- 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

0 comments on commit 52fae11

Please sign in to comment.