diff --git a/bower.json b/bower.json index c09bfe9ca..70948ac92 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.6.322", + "version": "1.6.324", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 580a9a633..4aea4bc23 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -23,8 +23,8 @@ } }(this, function (exports) { 'use strict'; - var pdfjsVersion = '1.6.322'; - var pdfjsBuild = '043cea2'; + var pdfjsVersion = '1.6.324'; + var pdfjsBuild = 'f6a8d9c'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsLibs = {}; (function pdfjsWrapper() { diff --git a/build/pdf.js b/build/pdf.js index 03cc8144a..a6f5ae398 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -23,8 +23,8 @@ } }(this, function (exports) { 'use strict'; - var pdfjsVersion = '1.6.322'; - var pdfjsBuild = '043cea2'; + var pdfjsVersion = '1.6.324'; + var pdfjsBuild = 'f6a8d9c'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsLibs = {}; (function pdfjsWrapper() { diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 17f559f78..709b00027 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -23,8 +23,8 @@ } }(this, function (exports) { 'use strict'; - var pdfjsVersion = '1.6.322'; - var pdfjsBuild = '043cea2'; + var pdfjsVersion = '1.6.324'; + var pdfjsBuild = 'f6a8d9c'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsLibs = {}; (function pdfjsWrapper() { diff --git a/package.json b/package.json index b68254b8f..41f376b32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.6.322", + "version": "1.6.324", "main": "build/pdf.js", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ diff --git a/web/pdf_viewer.js b/web/pdf_viewer.js index e3543d8c3..24a824bf4 100644 --- a/web/pdf_viewer.js +++ b/web/pdf_viewer.js @@ -195,6 +195,8 @@ var CSS_UNITS = 96.0 / 72.0; var DEFAULT_SCALE_VALUE = 'auto'; var DEFAULT_SCALE = 1.0; + var MIN_SCALE = 0.25; + var MAX_SCALE = 10.0; var UNKNOWN_SCALE = 0; var MAX_AUTO_SCALE = 1.25; var SCROLLBAR_PADDING = 40; @@ -451,6 +453,22 @@ } return delta; } + var animationStarted = new Promise(function (resolve) { + window.requestAnimationFrame(resolve); + }); + var localized = new Promise(function (resolve, reject) { + if (!mozL10n) { + reject(new Error('mozL10n service is not available.')); + return; + } + if (mozL10n.getReadyState() !== 'loading') { + resolve(); + return; + } + window.addEventListener('localized', function localized(evt) { + resolve(); + }); + }); var EventBus = function EventBusClosure() { function EventBus() { this._listeners = Object.create(null); @@ -549,6 +567,8 @@ exports.CSS_UNITS = CSS_UNITS; exports.DEFAULT_SCALE_VALUE = DEFAULT_SCALE_VALUE; exports.DEFAULT_SCALE = DEFAULT_SCALE; + exports.MIN_SCALE = MIN_SCALE; + exports.MAX_SCALE = MAX_SCALE; exports.UNKNOWN_SCALE = UNKNOWN_SCALE; exports.MAX_AUTO_SCALE = MAX_AUTO_SCALE; exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING; @@ -567,6 +587,8 @@ exports.watchScroll = watchScroll; exports.binarySearchFirstItem = binarySearchFirstItem; exports.normalizeWheelEventDelta = normalizeWheelEventDelta; + exports.animationStarted = animationStarted; + exports.localized = localized; })); (function (root, factory) { factory(root.pdfjsWebDOMEvents = {}, root.pdfjsWebUIUtils);