Refactors getTextContent return value

This commit is contained in:
Yury Delendik 2014-01-17 13:26:00 -06:00
parent 11e0ab3530
commit 96fff4cc74
4 changed files with 22 additions and 28 deletions

View file

@ -62,7 +62,7 @@ var TextLayerBuilder = function textLayerBuilder(options) {
this.renderLayer = function textLayerBuilderRenderLayer() {
var self = this;
var textDivs = this.textDivs;
var bidiTexts = this.textContent.bidiTexts;
var bidiTexts = this.textContent;
var textLayerDiv = this.textLayerDiv;
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
@ -149,7 +149,7 @@ var TextLayerBuilder = function textLayerBuilder(options) {
this.divContentDone = true;
var textDivs = this.textDivs;
var bidiTexts = this.textContent.bidiTexts;
var bidiTexts = this.textContent;
for (var i = 0; i < bidiTexts.length; i++) {
var bidiText = bidiTexts[i];
@ -181,7 +181,7 @@ var TextLayerBuilder = function textLayerBuilder(options) {
this.convertMatches = function textLayerBuilderConvertMatches(matches) {
var i = 0;
var iIndex = 0;
var bidiTexts = this.textContent.bidiTexts;
var bidiTexts = this.textContent;
var end = bidiTexts.length - 1;
var queryLen = PDFFindController === null ?
0 : PDFFindController.state.query.length;
@ -240,7 +240,7 @@ var TextLayerBuilder = function textLayerBuilder(options) {
return;
}
var bidiTexts = this.textContent.bidiTexts;
var bidiTexts = this.textContent;
var textDivs = this.textDivs;
var prevEnd = null;
var isSelectedPage = PDFFindController === null ?
@ -355,7 +355,7 @@ var TextLayerBuilder = function textLayerBuilder(options) {
// Clear out all matches.
var matches = this.matches;
var textDivs = this.textDivs;
var bidiTexts = this.textContent.bidiTexts;
var bidiTexts = this.textContent;
var clearedUntilDivIdx = -1;
// Clear out all current matches.