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.
pull/2/merge
Dobrica Pavlinusic 12 years ago
parent ffc411096e
commit 12fee4f7c5

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

Loading…
Cancel
Save