1
0
Fork 0
mirror of https://github.com/Yetangitu/owncloud-apps.git synced 2025-10-03 14:59:19 +02:00

files_reade: working towards working search, W.I.P.

This commit is contained in:
frankdelange 2017-03-29 15:42:27 +02:00
parent 2dd54dd028
commit 4b31f04330
14 changed files with 580 additions and 173 deletions

View file

@ -177,16 +177,26 @@ PDFJS.reader.TocController = function() {
var onShow = function() {
tocView.classList.add('open');
scrollToPage(settings.currentPage);
};
var onHide = function() {
tocView.classList.remove('open');
};
var scrollToPage = function (pageNum) {
if (pageNum > 0 && pageNum <= settings.numPages) {
thumb = document.getElementById("page_" + pageNum);
if (thumb)
thumb.scrollIntoView();
}
};
return {
"show" : onShow,
"hide" : onHide,
"tocInsert": tocInsert,
"totPopulate": tocPopulate
"totPopulate": tocPopulate,
"scrollToPage": scrollToPage
};
};