mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
support goto relative page number
We can input relative page number now in the reader goto dialog. Goto "+4" will page forward 4 pages and goto "-4" will page backward 4 pages. This implements #1437.
This commit is contained in:
@@ -799,6 +799,11 @@ function ReaderPaging:onGotoPage(number)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderPaging:onGotoRelativePage(number)
|
||||
self:gotoPage(self.current_page + number)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderPaging:onGotoPercentage(percentage)
|
||||
if percentage < 0 then percentage = 0 end
|
||||
if percentage > 1 then percentage = 1 end
|
||||
|
||||
Reference in New Issue
Block a user