mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
mod: adapt jumpstack in CREReader
This commit is contained in:
@@ -27,6 +27,12 @@ end
|
||||
function CREReader:goto(pos)
|
||||
local pos = math.min(pos, self.doc:GetFullHeight())
|
||||
pos = math.max(pos, 0)
|
||||
|
||||
-- add to jump_stack, distinguish jump from normal page turn
|
||||
if self.pos and math.abs(self.pos - pos) > height then
|
||||
self:addJump(self.pos)
|
||||
end
|
||||
|
||||
self.doc:gotoPos(pos)
|
||||
self.doc:drawCurrentPage(self.nulldc, fb.bb)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user