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:
Dobrica Pavlinusic
2012-02-29 18:55:58 +01:00
parent ffc411096e
commit 12fee4f7c5

View File

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