Browse Source

PDF.js version 1.1.82

master v1.1.82
Pdf Bot 10 years ago
parent
commit
39f482f48f
  1. 2
      bower.json
  2. 4
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 4
      build/pdf.worker.js
  5. 2
      package.json
  6. 8
      web/pdf_viewer.css
  7. 34
      web/pdf_viewer.js

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.1.73",
"version": "1.1.82",
"main": [
"build/pdf.js",
"build/pdf.worker.js"

4
build/pdf.combined.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -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

4
build/pdf.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -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

4
build/pdf.worker.js vendored

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -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

2
package.json

@ -1,6 +1,6 @@ @@ -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",

8
web/pdf_viewer.css

@ -105,22 +105,22 @@ @@ -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;
}

34
web/pdf_viewer.js

@ -1995,11 +1995,8 @@ var PDFViewer = (function pdfViewer() { @@ -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() { @@ -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() { @@ -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() { @@ -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() { @@ -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() { @@ -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
});
},

Loading…
Cancel
Save