mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #19 from dpavlin/master
fix panning on page in ZOOM_BY_VALUE mode
This commit is contained in:
@@ -437,8 +437,8 @@ function PDFReader:inputloop()
|
||||
x = self.shift_x / 5
|
||||
y = self.shift_y / 5
|
||||
elseif self.pan_by_page then
|
||||
x = self.width - 5; -- small overlap when moving by page
|
||||
y = self.height - 5;
|
||||
x = width - 5; -- small overlap when moving by page
|
||||
y = height - 5;
|
||||
else
|
||||
x = self.shift_x
|
||||
y = self.shift_y
|
||||
@@ -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