From 39f482f48fb2fbbe993171908d1ab7350b1bc7a9 Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Tue, 21 Apr 2015 21:00:00 +0100 Subject: [PATCH] PDF.js version 1.1.82 --- bower.json | 2 +- build/pdf.combined.js | 4 ++-- build/pdf.js | 4 ++-- build/pdf.worker.js | 4 ++-- package.json | 2 +- web/pdf_viewer.css | 8 ++++---- web/pdf_viewer.js | 34 +++++++++++++++++----------------- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/bower.json b/bower.json index d3a19d6a5..f23dc47b0 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.73", + "version": "1.1.82", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 37105b979..889ea63c2 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.73'; -PDFJS.build = '846eb96'; +PDFJS.version = '1.1.82'; +PDFJS.build = '71ab5e5'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/build/pdf.js b/build/pdf.js index 82cb8e6df..fe0f49556 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.73'; -PDFJS.build = '846eb96'; +PDFJS.version = '1.1.82'; +PDFJS.build = '71ab5e5'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 34346b0c4..02378e856 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.73'; -PDFJS.build = '846eb96'; +PDFJS.version = '1.1.82'; +PDFJS.build = '71ab5e5'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/package.json b/package.json index 78b8287c6..c1648d935 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.73", + "version": "1.1.82", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla", diff --git a/web/pdf_viewer.css b/web/pdf_viewer.css index 76ec3a871..e5671e4f0 100644 --- a/web/pdf_viewer.css +++ b/web/pdf_viewer.css @@ -105,22 +105,22 @@ box-shadow: 0px 2px 10px #ff0; } -:-webkit-full-screen .pdfViewer .page { +.pdfPresentationMode:-webkit-full-screen .pdfViewer .page { margin-bottom: 100%; border: 0; } -:-moz-full-screen .pdfViewer .page { +.pdfPresentationMode:-moz-full-screen .pdfViewer .page { margin-bottom: 100%; border: 0; } -:-ms-fullscreen .pdfViewer .page { +.pdfPresentationMode:-ms-fullscreen .pdfViewer .page { margin-bottom: 100% !important; border: 0; } -:fullscreen .pdfViewer .page { +.pdfPresentationMode:fullscreen .pdfViewer .page { margin-bottom: 100%; border: 0; } diff --git a/web/pdf_viewer.js b/web/pdf_viewer.js index 15e4035d4..2cc91b5a6 100644 --- a/web/pdf_viewer.js +++ b/web/pdf_viewer.js @@ -1995,11 +1995,8 @@ var PDFViewer = (function pdfViewer() { if (!noScroll) { var page = this._currentPageNumber, dest; - var inPresentationMode = - this.presentationModeState === PresentationModeState.CHANGING || - this.presentationModeState === PresentationModeState.FULLSCREEN; - if (this.location && !inPresentationMode && - !IGNORE_CURRENT_POSITION_ON_ZOOM) { + if (this.location && !IGNORE_CURRENT_POSITION_ON_ZOOM && + !(this.isInPresentationMode || this.isChangingPresentationMode)) { page = this.location.pageNumber; dest = [null, { name: 'XYZ' }, this.location.left, this.location.top, null]; @@ -2023,11 +2020,9 @@ var PDFViewer = (function pdfViewer() { if (!currentPage) { return; } - var inPresentationMode = - this.presentationModeState === PresentationModeState.FULLSCREEN; - var hPadding = (inPresentationMode || this.removePageBorders) ? + var hPadding = (this.isInPresentationMode || this.removePageBorders) ? 0 : SCROLLBAR_PADDING; - var vPadding = (inPresentationMode || this.removePageBorders) ? + var vPadding = (this.isInPresentationMode || this.removePageBorders) ? 0 : VERTICAL_PADDING; var pageWidthScale = (this.container.clientWidth - hPadding) / currentPage.width * currentPage.scale; @@ -2073,8 +2068,7 @@ var PDFViewer = (function pdfViewer() { dest) { var pageView = this.pages[pageNumber - 1]; - if (this.presentationModeState === - PresentationModeState.FULLSCREEN) { + if (this.isInPresentationMode) { if (this.linkService.page !== pageView.id) { // Avoid breaking getVisiblePages in presentation mode. this.linkService.page = pageView.id; @@ -2228,7 +2222,7 @@ var PDFViewer = (function pdfViewer() { currentId = visiblePages[0].id; } - if (this.presentationModeState !== PresentationModeState.FULLSCREEN) { + if (!this.isInPresentationMode) { this.currentPageNumber = currentId; } @@ -2253,13 +2247,21 @@ var PDFViewer = (function pdfViewer() { this.container.blur(); }, + get isInPresentationMode() { + return this.presentationModeState === PresentationModeState.FULLSCREEN; + }, + + get isChangingPresentationMode() { + return this.PresentationModeState === PresentationModeState.CHANGING; + }, + get isHorizontalScrollbarEnabled() { - return (this.presentationModeState === PresentationModeState.FULLSCREEN ? + return (this.isInPresentationMode ? false : (this.container.scrollWidth > this.container.clientWidth)); }, _getVisiblePages: function () { - if (this.presentationModeState !== PresentationModeState.FULLSCREEN) { + if (!this.isInPresentationMode) { return getVisibleElements(this.container, this.pages, true); } else { // The algorithm in getVisibleElements doesn't work in all browsers and @@ -2330,13 +2332,11 @@ var PDFViewer = (function pdfViewer() { * @returns {TextLayerBuilder} */ createTextLayerBuilder: function (textLayerDiv, pageIndex, viewport) { - var isViewerInPresentationMode = - this.presentationModeState === PresentationModeState.FULLSCREEN; return new TextLayerBuilder({ textLayerDiv: textLayerDiv, pageIndex: pageIndex, viewport: viewport, - findController: isViewerInPresentationMode ? null : this.findController + findController: this.isInPresentationMode ? null : this.findController }); },