mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Convert the files in the /web
folder to ES6 modules
Note that as discussed on IRC, this makes the viewer slightly slower to load *only* in `gulp server` mode, however the difference seem slight enough that I think it will be fine.
This commit is contained in:
parent
313060aff5
commit
3b35c15d42
32 changed files with 1585 additions and 2045 deletions
|
@ -13,17 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs-web/ui_utils', ['exports', 'pdfjs-web/pdfjs'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('./pdfjs.js'));
|
||||
} else {
|
||||
factory((root.pdfjsWebUIUtils = {}), root.pdfjsWebPDFJS);
|
||||
}
|
||||
}(this, function (exports, pdfjsLib) {
|
||||
import * as pdfjsLib from 'pdfjs-web/pdfjs';
|
||||
|
||||
var CSS_UNITS = 96.0 / 72.0;
|
||||
var DEFAULT_SCALE_VALUE = 'auto';
|
||||
|
@ -94,7 +84,7 @@ if (typeof PDFJSDev === 'undefined' ||
|
|||
* @var {string}
|
||||
*/
|
||||
PDFJS.locale = (PDFJS.locale === undefined ? navigator.language :
|
||||
PDFJS.locale);
|
||||
PDFJS.locale);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -571,30 +561,31 @@ var ProgressBar = (function ProgressBarClosure() {
|
|||
return ProgressBar;
|
||||
})();
|
||||
|
||||
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;
|
||||
exports.VERTICAL_PADDING = VERTICAL_PADDING;
|
||||
exports.RendererType = RendererType;
|
||||
exports.mozL10n = mozL10n;
|
||||
exports.EventBus = EventBus;
|
||||
exports.ProgressBar = ProgressBar;
|
||||
exports.getPDFFileNameFromURL = getPDFFileNameFromURL;
|
||||
exports.noContextMenuHandler = noContextMenuHandler;
|
||||
exports.parseQueryString = parseQueryString;
|
||||
exports.getVisibleElements = getVisibleElements;
|
||||
exports.roundToDivide = roundToDivide;
|
||||
exports.approximateFraction = approximateFraction;
|
||||
exports.getOutputScale = getOutputScale;
|
||||
exports.scrollIntoView = scrollIntoView;
|
||||
exports.watchScroll = watchScroll;
|
||||
exports.binarySearchFirstItem = binarySearchFirstItem;
|
||||
exports.normalizeWheelEventDelta = normalizeWheelEventDelta;
|
||||
exports.animationStarted = animationStarted;
|
||||
exports.localized = localized;
|
||||
}));
|
||||
export {
|
||||
CSS_UNITS,
|
||||
DEFAULT_SCALE_VALUE,
|
||||
DEFAULT_SCALE,
|
||||
MIN_SCALE,
|
||||
MAX_SCALE,
|
||||
UNKNOWN_SCALE,
|
||||
MAX_AUTO_SCALE,
|
||||
SCROLLBAR_PADDING,
|
||||
VERTICAL_PADDING,
|
||||
RendererType,
|
||||
mozL10n,
|
||||
EventBus,
|
||||
ProgressBar,
|
||||
getPDFFileNameFromURL,
|
||||
noContextMenuHandler,
|
||||
parseQueryString,
|
||||
getVisibleElements,
|
||||
roundToDivide,
|
||||
approximateFraction,
|
||||
getOutputScale,
|
||||
scrollIntoView,
|
||||
watchScroll,
|
||||
binarySearchFirstItem,
|
||||
normalizeWheelEventDelta,
|
||||
animationStarted,
|
||||
localized,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue