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

files_reader: more PDF work, functioning search, experimental search highlighting

This commit is contained in:
frankdelange 2017-03-30 19:25:34 +02:00
parent d8b4e395ca
commit fed0e9fdd7
8 changed files with 241 additions and 108 deletions

View file

@ -116,12 +116,14 @@ PDFJS.Reader.TextLayerController.prototype.setTextContent = function (textConten
};
PDFJS.Reader.TextLayerController.prototype.convertMatches = function(matches, matchesLength) {
var reader = this;
var i = 0;
var iIndex = 0;
var bidiTexts = this.textContent.items;
var end = bidiTexts.length - 1;
var queryLen = (this.findController === null ?
0 : this.findController.state.query.length);
var queryLen = reader.search.query.length;
var ret = [];
if (!matches) {
return ret;
@ -177,6 +179,8 @@ PDFJS.Reader.TextLayerController.prototype.renderMatches = function (matches) {
return;
}
var reader = this;
var bidiTexts = this.textContent.items;
var textDivs = this.textDivs;
var prevEnd = null;