mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +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,25 +13,10 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs-web/pdf_thumbnail_viewer', ['exports',
|
||||
'pdfjs-web/ui_utils', 'pdfjs-web/pdf_thumbnail_view'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('./ui_utils.js'),
|
||||
require('./pdf_thumbnail_view.js'));
|
||||
} else {
|
||||
factory((root.pdfjsWebPDFThumbnailViewer = {}), root.pdfjsWebUIUtils,
|
||||
root.pdfjsWebPDFThumbnailView);
|
||||
}
|
||||
}(this, function (exports, uiUtils, pdfThumbnailView) {
|
||||
|
||||
var watchScroll = uiUtils.watchScroll;
|
||||
var getVisibleElements = uiUtils.getVisibleElements;
|
||||
var scrollIntoView = uiUtils.scrollIntoView;
|
||||
var PDFThumbnailView = pdfThumbnailView.PDFThumbnailView;
|
||||
import {
|
||||
getVisibleElements, scrollIntoView, watchScroll
|
||||
} from 'pdfjs-web/ui_utils';
|
||||
import { PDFThumbnailView } from 'pdfjs-web/pdf_thumbnail_view';
|
||||
|
||||
var THUMBNAIL_SCROLL_MARGIN = -19;
|
||||
|
||||
|
@ -247,5 +232,6 @@ var PDFThumbnailViewer = (function PDFThumbnailViewerClosure() {
|
|||
return PDFThumbnailViewer;
|
||||
})();
|
||||
|
||||
exports.PDFThumbnailViewer = PDFThumbnailViewer;
|
||||
}));
|
||||
export {
|
||||
PDFThumbnailViewer,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue