Removes lastScrollSource and isViewerInPresentationMode from TextLayerBuilderOptions

This commit is contained in:
Yury Delendik 2014-12-17 14:12:51 -06:00
parent b930228788
commit 2ac7ac4678
5 changed files with 67 additions and 48 deletions

View file

@ -18,6 +18,8 @@
'use strict';
var TEXT_LAYER_RENDER_DELAY = 200; // ms
/**
* @typedef {Object} PDFPageViewOptions
* @property {HTMLDivElement} container - The viewer element.
@ -194,6 +196,15 @@ var PDFPageView = (function PDFPageViewClosure() {
this.reset(true);
},
/**
* Called when moved in the parent's container.
*/
updatePosition: function PDFPageView_updatePosition() {
if (this.textLayer) {
this.textLayer.render(TEXT_LAYER_RENDER_DELAY);
}
},
cssTransform: function PDFPageView_transform(canvas, redrawAnnotations) {
// Scale canvas, canvas wrapper, and page container.
var width = this.viewport.width;
@ -429,6 +440,7 @@ var PDFPageView = (function PDFPageViewClosure() {
self.pdfPage.getTextContent().then(
function textContentResolved(textContent) {
textLayer.setTextContent(textContent);
textLayer.render(TEXT_LAYER_RENDER_DELAY);
}
);
}