mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Add Book map and Page browser features
- Book map: shows a map of content, including TOC, boomarks, read pages, non-linear flows... - Page browser: shows thumbnails of pages. - ReaderThumbnail: new Reader module that provides a service for generating thumbnails of book pages. It makes available these 2 new fullscreen widgets. - ReaderBookmark, ReaderLink, Statistics: add methods to return new views of bookmarks, previous locations and read pages, that are needed by BookMapWidget. - ReaderToc: compute TOC max_depth. - ReaderBookmark, ReaderHighlight: send events on bookmark add/update/remove so thumbnails of the pages impacted can be trashed.
This commit is contained in:
@@ -524,6 +524,21 @@ function ReaderLink:onClearLocationStack(show_notification)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderLink:getPreviousLocationPages()
|
||||
local previous_locations = {}
|
||||
if #self.location_stack > 0 then
|
||||
for num, location in ipairs(self.location_stack) do
|
||||
if self.ui.rolling and location.xpointer then
|
||||
previous_locations[self.ui.document:getPageFromXPointer(location.xpointer)] = num
|
||||
end
|
||||
if self.ui.paging and location[1] and location[1].page then
|
||||
previous_locations[location[1].page] = num
|
||||
end
|
||||
end
|
||||
end
|
||||
return previous_locations
|
||||
end
|
||||
|
||||
--- Goes to link.
|
||||
-- (This is called by other modules (highlight, search) to jump to a xpointer,
|
||||
-- they should not provide allow_footnote_popup=true)
|
||||
|
||||
Reference in New Issue
Block a user