mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
add gotoLocation for credocument
This commit is contained in:
@@ -119,6 +119,10 @@ function CreDocument:close()
|
||||
Document.close(self)
|
||||
end
|
||||
|
||||
function CreDocument:getPageCount()
|
||||
return self._document:getPages()
|
||||
end
|
||||
|
||||
function CreDocument:drawCurrentView(target, x, y, rect, pos)
|
||||
tile_bb = Blitbuffer.new(rect.w, rect.h)
|
||||
self._document:drawCurrentPage(tile_bb)
|
||||
|
||||
@@ -126,6 +126,10 @@ function Document:_readMetadata()
|
||||
return true
|
||||
end
|
||||
|
||||
function Document:getPageCount()
|
||||
return self.info.number_of_pages
|
||||
end
|
||||
|
||||
-- calculates page dimensions
|
||||
function Document:getPageDimensions(pageno, zoom, rotation)
|
||||
local native_dimen = self:getNativePageDimensions(pageno):copy()
|
||||
|
||||
@@ -325,4 +325,7 @@ function ReaderRolling:gotoPercent(new_percent)
|
||||
self:gotoPos(new_percent * self.doc_height / 10000)
|
||||
end
|
||||
|
||||
|
||||
function ReaderRolling:onGotoPage(number)
|
||||
self:gotoPage(number)
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user