Browse Source

PDF.js version 1.1.233

master v1.1.233
Pdf Bot 10 years ago
parent
commit
4c62b1e392
  1. 2
      bower.json
  2. 6
      build/pdf.combined.js
  3. 6
      build/pdf.js
  4. 6
      build/pdf.worker.js
  5. 2
      package.json
  6. 19
      web/pdf_viewer.js

2
bower.json

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

6
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.230';
PDFJS.build = '1da0b3a';
PDFJS.version = '1.1.233';
PDFJS.build = '0a744fb';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -534,7 +534,7 @@ Object.defineProperty(PDFJS, 'isLittleEndian', { @@ -534,7 +534,7 @@ Object.defineProperty(PDFJS, 'isLittleEndian', {
}
});
// Lazy test if the userAgant support CanvasTypedArrays
// Lazy test if the userAgent support CanvasTypedArrays
function hasCanvasTypedArrays() {
var canvas = document.createElement('canvas');
canvas.width = canvas.height = 1;

6
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.230';
PDFJS.build = '1da0b3a';
PDFJS.version = '1.1.233';
PDFJS.build = '0a744fb';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -534,7 +534,7 @@ Object.defineProperty(PDFJS, 'isLittleEndian', { @@ -534,7 +534,7 @@ Object.defineProperty(PDFJS, 'isLittleEndian', {
}
});
// Lazy test if the userAgant support CanvasTypedArrays
// Lazy test if the userAgent support CanvasTypedArrays
function hasCanvasTypedArrays() {
var canvas = document.createElement('canvas');
canvas.width = canvas.height = 1;

6
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.230';
PDFJS.build = '1da0b3a';
PDFJS.version = '1.1.233';
PDFJS.build = '0a744fb';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -534,7 +534,7 @@ Object.defineProperty(PDFJS, 'isLittleEndian', { @@ -534,7 +534,7 @@ Object.defineProperty(PDFJS, 'isLittleEndian', {
}
});
// Lazy test if the userAgant support CanvasTypedArrays
// Lazy test if the userAgent support CanvasTypedArrays
function hasCanvasTypedArrays() {
var canvas = document.createElement('canvas');
canvas.width = canvas.height = 1;

2
package.json

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

19
web/pdf_viewer.js

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
/*jshint globalstrict: false */
/* globals PDFJS, PDFViewer, PDFPageView, TextLayerBuilder, PDFLinkService,
DefaultTextLayerFactory, AnnotationsLayerBuilder, PDFHistory,
DefaultAnnotationsLayerFactory, getFileName */
DefaultAnnotationsLayerFactory, getFileName, ProgressBar */
// Initializing PDFJS global object (if still undefined)
if (typeof PDFJS === 'undefined') {
@ -29,7 +29,8 @@ if (typeof PDFJS === 'undefined') { @@ -29,7 +29,8 @@ if (typeof PDFJS === 'undefined') {
var CSS_UNITS = 96.0 / 72.0;
var DEFAULT_SCALE = 'auto';
var DEFAULT_SCALE_VALUE = 'auto';
var DEFAULT_SCALE = 1.0;
var UNKNOWN_SCALE = 0;
var MAX_AUTO_SCALE = 1.25;
var SCROLLBAR_PADDING = 40;
@ -2079,7 +2080,8 @@ var PDFViewer = (function pdfViewer() { @@ -2079,7 +2080,8 @@ var PDFViewer = (function pdfViewer() {
* @returns {number}
*/
get currentScale() {
return this._currentScale;
return this._currentScale !== UNKNOWN_SCALE ? this._currentScale :
DEFAULT_SCALE;
},
/**
@ -2091,7 +2093,7 @@ var PDFViewer = (function pdfViewer() { @@ -2091,7 +2093,7 @@ var PDFViewer = (function pdfViewer() {
}
if (!this.pdfDocument) {
this._currentScale = val;
this._currentScaleValue = val.toString();
this._currentScaleValue = val !== UNKNOWN_SCALE ? val.toString() : null;
return;
}
this._setScale(val, false);
@ -2195,7 +2197,7 @@ var PDFViewer = (function pdfViewer() { @@ -2195,7 +2197,7 @@ var PDFViewer = (function pdfViewer() {
// Fetch a single page so we can get a viewport that will be the default
// viewport for all pages
return firstPagePromise.then(function(pdfPage) {
var scale = this._currentScale || 1.0;
var scale = this.currentScale;
var viewport = pdfPage.getViewport(scale * CSS_UNITS);
for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) {
var textLayerFactory = null;
@ -2453,10 +2455,10 @@ var PDFViewer = (function pdfViewer() { @@ -2453,10 +2455,10 @@ var PDFViewer = (function pdfViewer() {
return;
}
if (scale && scale !== this.currentScale) {
if (scale && scale !== this._currentScale) {
this.currentScaleValue = scale;
} else if (this.currentScale === UNKNOWN_SCALE) {
this.currentScaleValue = DEFAULT_SCALE;
} else if (this._currentScale === UNKNOWN_SCALE) {
this.currentScaleValue = DEFAULT_SCALE_VALUE;
}
if (scale === 'page-fit' && !dest[4]) {
@ -3104,5 +3106,6 @@ var PDFHistory = (function () { @@ -3104,5 +3106,6 @@ var PDFHistory = (function () {
PDFJS.PDFHistory = PDFHistory;
PDFJS.getFileName = getFileName;
PDFJS.ProgressBar = ProgressBar;
}).call((typeof window === 'undefined') ? this : window);

Loading…
Cancel
Save