add gotoPercent for readerrolling.lua
This commit is contained in:
1 parent
2b39ba8b83
commit
4fb2c9d2e3
1 file changed
+5
-1
@@ -40,9 +40,13 @@ function ReaderRolling:gotoPos(new_pos)
|
||||
self.ui:handleEvent(Event:new("PosUpdate", new_pos))
|
||||
end
|
||||
|
||||
function ReaderRolling:gotoPercent(new_percent)
|
||||
self:gotoPos(new_percent * self.length / 10000)
|
||||
end
|
||||
|
||||
function ReaderRolling:onGotoPercent(percent)
|
||||
DEBUG("goto document offset in percent:", percent)
|
||||
self:gotoPos(percent * self.length / 10000)
|
||||
self:gotoPercent(percent)
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user