From 52fae11da79dda68caf634825f97272dc084b52d Mon Sep 17 00:00:00 2001 From: hugleo Date: Fri, 16 Feb 2024 21:34:40 -0300 Subject: [PATCH] ReaderView: ensure pan zoom mode on document open (#11425) 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. --- frontend/apps/reader/modules/readerview.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerview.lua b/frontend/apps/reader/modules/readerview.lua index a8e5bbbe6..4e872edd2 100644 --- a/frontend/apps/reader/modules/readerview.lua +++ b/frontend/apps/reader/modules/readerview.lua @@ -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