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:
@@ -331,6 +331,14 @@ function ReaderRolling:onGotoPage(number)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderRolling:onGotoRelativePage(number)
|
||||
if number then
|
||||
self:gotoPage(self.current_page + number)
|
||||
end
|
||||
self.xpointer = self.ui.document:getXPointer()
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderRolling:onGotoXPointer(xp)
|
||||
self:gotoXPointer(xp)
|
||||
self.xpointer = xp
|
||||
|
||||
Reference in New Issue
Block a user