Merge pull request #8531 from Snuffleupagus/rm-updatePosition

Remove `PDFPageView.updatePosition` since it's not actually necessary
This commit is contained in:
Yury Delendik 2017-06-15 12:09:35 -05:00 committed by GitHub
commit 209751346c
2 changed files with 1 additions and 13 deletions

View File

@ -255,15 +255,6 @@ class PDFPageView {
} }
} }
/**
* Called when moved in the parent's container.
*/
updatePosition() {
if (this.textLayer) {
this.textLayer.render(TEXT_LAYER_RENDER_DELAY);
}
}
cssTransform(target, redrawAnnotations = false) { cssTransform(target, redrawAnnotations = false) {
// Scale target (canvas or svg), its wrapper and page container. // Scale target (canvas or svg), its wrapper and page container.
let width = this.viewport.width; let width = this.viewport.width;

View File

@ -452,14 +452,11 @@ var PDFViewer = (function pdfViewer() {
this.viewer.textContent = ''; this.viewer.textContent = '';
}, },
_scrollUpdate: function PDFViewer_scrollUpdate() { _scrollUpdate() {
if (this.pagesCount === 0) { if (this.pagesCount === 0) {
return; return;
} }
this.update(); this.update();
for (var i = 0, ii = this._pages.length; i < ii; i++) {
this._pages[i].updatePosition();
}
}, },
_setScaleDispatchEvent: function pdfViewer_setScaleDispatchEvent( _setScaleDispatchEvent: function pdfViewer_setScaleDispatchEvent(