From 7b983ee7e647f767f8e70993d487dc84060f7710 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 27 Sep 2012 20:56:20 +0200 Subject: [PATCH] fix fiveway pan to right-bottom of previous page --- unireader.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unireader.lua b/unireader.lua index 25b346285..fbda44d88 100644 --- a/unireader.lua +++ b/unireader.lua @@ -2761,10 +2761,13 @@ function UniReader:addAllCommands() if unireader.pan_by_page then if unireader.offset_x > 0 and unireader.pageno > 1 then unireader.adjust_offset = function(unireader) - unireader.offset_x = unireader.pan_x + local columns = math.floor( math.abs( unireader.min_offset_x - unireader.pan_x ) / G_width + 0.5 ) -- round for thin columns + unireader.offset_x = unireader.pan_x - columns * G_width -- move to last column unireader.offset_y = unireader.min_offset_y Debug("pan to right-bottom of previous page") end + self.globalzoom_mode = self.pan_by_page + Debug("recalculate top-left of previous page") unireader:goto(unireader.pageno - 1) else unireader.show_overlap = 0