|
@@ -701,6 +701,8 @@ var PDFViewerApplication = {
|
|
_this6.initialBookmark = initialParams.bookmark;
|
|
_this6.initialBookmark = initialParams.bookmark;
|
|
pdfViewer.currentScaleValue = pdfViewer.currentScaleValue;
|
|
pdfViewer.currentScaleValue = pdfViewer.currentScaleValue;
|
|
_this6.setInitialView(initialParams.hash);
|
|
_this6.setInitialView(initialParams.hash);
|
|
|
|
+ }).then(function () {
|
|
|
|
+ pdfViewer.update();
|
|
});
|
|
});
|
|
});
|
|
});
|
|
pdfDocument.getPageLabels().then(function (labels) {
|
|
pdfDocument.getPageLabels().then(function (labels) {
|
|
@@ -1274,13 +1276,17 @@ function webViewerUpdateViewarea(evt) {
|
|
PDFViewerApplication.toolbar.updateLoadingIndicatorState(loading);
|
|
PDFViewerApplication.toolbar.updateLoadingIndicatorState(loading);
|
|
}
|
|
}
|
|
function webViewerResize() {
|
|
function webViewerResize() {
|
|
- var currentScaleValue = PDFViewerApplication.pdfViewer.currentScaleValue;
|
|
|
|
|
|
+ var pdfDocument = PDFViewerApplication.pdfDocument,
|
|
|
|
+ pdfViewer = PDFViewerApplication.pdfViewer;
|
|
|
|
+
|
|
|
|
+ if (!pdfDocument) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var currentScaleValue = pdfViewer.currentScaleValue;
|
|
if (currentScaleValue === 'auto' || currentScaleValue === 'page-fit' || currentScaleValue === 'page-width') {
|
|
if (currentScaleValue === 'auto' || currentScaleValue === 'page-fit' || currentScaleValue === 'page-width') {
|
|
- PDFViewerApplication.pdfViewer.currentScaleValue = currentScaleValue;
|
|
|
|
- } else if (!currentScaleValue) {
|
|
|
|
- PDFViewerApplication.pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE;
|
|
|
|
|
|
+ pdfViewer.currentScaleValue = currentScaleValue;
|
|
}
|
|
}
|
|
- PDFViewerApplication.pdfViewer.update();
|
|
|
|
|
|
+ pdfViewer.update();
|
|
}
|
|
}
|
|
function webViewerHashchange(evt) {
|
|
function webViewerHashchange(evt) {
|
|
if (PDFViewerApplication.pdfHistory.isHashChangeUnlocked) {
|
|
if (PDFViewerApplication.pdfHistory.isHashChangeUnlocked) {
|