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:
1 parent
ea76d91ed4
commit
992e769aaf
3 files changed
+25
-18
No files matched your search
@@ -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