mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
reset y panning when moving left or right
This makes this pan mode really useful, because you don't need to go all the way to top of page when you get to bottom of first column.
This commit is contained in:
@@ -453,11 +453,17 @@ function PDFReader:inputloop()
|
||||
if self.offset_x > 0 then
|
||||
self.offset_x = 0
|
||||
end
|
||||
if self.pan_by_page then
|
||||
self.offset_y = 0
|
||||
end
|
||||
elseif ev.code == KEY_FW_RIGHT then
|
||||
self.offset_x = self.offset_x - x
|
||||
if self.offset_x < self.min_offset_x then
|
||||
self.offset_x = self.min_offset_x
|
||||
end
|
||||
if self.pan_by_page then
|
||||
self.offset_y = 0
|
||||
end
|
||||
elseif ev.code == KEY_FW_UP then
|
||||
self.offset_y = self.offset_y + y
|
||||
if self.offset_y > 0 then
|
||||
|
||||
Reference in New Issue
Block a user