ReaderView: ensure that the pan zoom direction is not nil (#11557)

Fix gif and web files not opening: https://github.com/koreader/koreader/pull/11425#issuecomment-2002164851
reviewable/pr11568/r1
hugleo 1 month ago committed by GitHub
parent 5d2782ddfe
commit 424fa9b6fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -695,7 +695,8 @@ 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.document.configurable.zoom_direction >= 2 and self.document.configurable.zoom_direction <= 5 then -- zoom_bottom_to_top
-- Check if we are in zoom_bottom_to_top
if self.document.configurable.zoom_direction and self.document.configurable.zoom_direction >= 2 and self.document.configurable.zoom_direction <= 5 then
-- starts from bottom of page_area
self.visible_area.y = self.page_area.y + self.page_area.h - self.visible_area.h
else

Loading…
Cancel
Save