2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

fix fiveway pan to right-bottom of previous page

This commit is contained in:
Dobrica Pavlinusic 2012-09-27 20:56:20 +02:00
parent 01a57b2fb9
commit 7b983ee7e6

View File

@ -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