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 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.1.73", "version": "1.1.82",
"main": [ "main": [
"build/pdf.js", "build/pdf.js",
"build/pdf.worker.js" "build/pdf.worker.js"

4
build/pdf.combined.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.1.73'; PDFJS.version = '1.1.82';
PDFJS.build = '846eb96'; PDFJS.build = '71ab5e5';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

4
build/pdf.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.1.73'; PDFJS.version = '1.1.82';
PDFJS.build = '846eb96'; PDFJS.build = '71ab5e5';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // 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') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.1.73'; PDFJS.version = '1.1.82';
PDFJS.build = '846eb96'; PDFJS.build = '71ab5e5';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.1.73", "version": "1.1.82",
"description": "Generic build of Mozilla's PDF.js library.", "description": "Generic build of Mozilla's PDF.js library.",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",

8
web/pdf_viewer.css

@ -105,22 +105,22 @@
box-shadow: 0px 2px 10px #ff0; box-shadow: 0px 2px 10px #ff0;
} }
:-webkit-full-screen .pdfViewer .page { .pdfPresentationMode:-webkit-full-screen .pdfViewer .page {
margin-bottom: 100%; margin-bottom: 100%;
border: 0; border: 0;
} }
:-moz-full-screen .pdfViewer .page { .pdfPresentationMode:-moz-full-screen .pdfViewer .page {
margin-bottom: 100%; margin-bottom: 100%;
border: 0; border: 0;
} }
:-ms-fullscreen .pdfViewer .page { .pdfPresentationMode:-ms-fullscreen .pdfViewer .page {
margin-bottom: 100% !important; margin-bottom: 100% !important;
border: 0; border: 0;
} }
:fullscreen .pdfViewer .page { .pdfPresentationMode:fullscreen .pdfViewer .page {
margin-bottom: 100%; margin-bottom: 100%;
border: 0; border: 0;
} }

34
web/pdf_viewer.js

@ -1995,11 +1995,8 @@ var PDFViewer = (function pdfViewer() {
if (!noScroll) { if (!noScroll) {
var page = this._currentPageNumber, dest; var page = this._currentPageNumber, dest;
var inPresentationMode = if (this.location && !IGNORE_CURRENT_POSITION_ON_ZOOM &&
this.presentationModeState === PresentationModeState.CHANGING || !(this.isInPresentationMode || this.isChangingPresentationMode)) {
this.presentationModeState === PresentationModeState.FULLSCREEN;
if (this.location && !inPresentationMode &&
!IGNORE_CURRENT_POSITION_ON_ZOOM) {
page = this.location.pageNumber; page = this.location.pageNumber;
dest = [null, { name: 'XYZ' }, this.location.left, dest = [null, { name: 'XYZ' }, this.location.left,
this.location.top, null]; this.location.top, null];
@ -2023,11 +2020,9 @@ var PDFViewer = (function pdfViewer() {
if (!currentPage) { if (!currentPage) {
return; return;
} }
var inPresentationMode = var hPadding = (this.isInPresentationMode || this.removePageBorders) ?
this.presentationModeState === PresentationModeState.FULLSCREEN;
var hPadding = (inPresentationMode || this.removePageBorders) ?
0 : SCROLLBAR_PADDING; 0 : SCROLLBAR_PADDING;
var vPadding = (inPresentationMode || this.removePageBorders) ? var vPadding = (this.isInPresentationMode || this.removePageBorders) ?
0 : VERTICAL_PADDING; 0 : VERTICAL_PADDING;
var pageWidthScale = (this.container.clientWidth - hPadding) / var pageWidthScale = (this.container.clientWidth - hPadding) /
currentPage.width * currentPage.scale; currentPage.width * currentPage.scale;
@ -2073,8 +2068,7 @@ var PDFViewer = (function pdfViewer() {
dest) { dest) {
var pageView = this.pages[pageNumber - 1]; var pageView = this.pages[pageNumber - 1];
if (this.presentationModeState === if (this.isInPresentationMode) {
PresentationModeState.FULLSCREEN) {
if (this.linkService.page !== pageView.id) { if (this.linkService.page !== pageView.id) {
// Avoid breaking getVisiblePages in presentation mode. // Avoid breaking getVisiblePages in presentation mode.
this.linkService.page = pageView.id; this.linkService.page = pageView.id;
@ -2228,7 +2222,7 @@ var PDFViewer = (function pdfViewer() {
currentId = visiblePages[0].id; currentId = visiblePages[0].id;
} }
if (this.presentationModeState !== PresentationModeState.FULLSCREEN) { if (!this.isInPresentationMode) {
this.currentPageNumber = currentId; this.currentPageNumber = currentId;
} }
@ -2253,13 +2247,21 @@ var PDFViewer = (function pdfViewer() {
this.container.blur(); this.container.blur();
}, },
get isInPresentationMode() {
return this.presentationModeState === PresentationModeState.FULLSCREEN;
},
get isChangingPresentationMode() {
return this.PresentationModeState === PresentationModeState.CHANGING;
},
get isHorizontalScrollbarEnabled() { get isHorizontalScrollbarEnabled() {
return (this.presentationModeState === PresentationModeState.FULLSCREEN ? return (this.isInPresentationMode ?
false : (this.container.scrollWidth > this.container.clientWidth)); false : (this.container.scrollWidth > this.container.clientWidth));
}, },
_getVisiblePages: function () { _getVisiblePages: function () {
if (this.presentationModeState !== PresentationModeState.FULLSCREEN) { if (!this.isInPresentationMode) {
return getVisibleElements(this.container, this.pages, true); return getVisibleElements(this.container, this.pages, true);
} else { } else {
// The algorithm in getVisibleElements doesn't work in all browsers and // The algorithm in getVisibleElements doesn't work in all browsers and
@ -2330,13 +2332,11 @@ var PDFViewer = (function pdfViewer() {
* @returns {TextLayerBuilder} * @returns {TextLayerBuilder}
*/ */
createTextLayerBuilder: function (textLayerDiv, pageIndex, viewport) { createTextLayerBuilder: function (textLayerDiv, pageIndex, viewport) {
var isViewerInPresentationMode =
this.presentationModeState === PresentationModeState.FULLSCREEN;
return new TextLayerBuilder({ return new TextLayerBuilder({
textLayerDiv: textLayerDiv, textLayerDiv: textLayerDiv,
pageIndex: pageIndex, pageIndex: pageIndex,
viewport: viewport, viewport: viewport,
findController: isViewerInPresentationMode ? null : this.findController findController: this.isInPresentationMode ? null : this.findController
}); });
}, },

Loading…
Cancel
Save