Convert the files in the /src/display folder to ES6 modules

Also disables ES2015 transpilation in development mode.
This commit is contained in:
Jonas Jenwald 2017-04-02 14:25:33 +02:00
parent c6e8ca863e
commit 52e3de3c0a
12 changed files with 453 additions and 628 deletions

View file

@ -14,22 +14,8 @@
*/
/* eslint-disable no-multi-str */
'use strict';
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('pdfjs/display/webgl', ['exports', 'pdfjs/shared/util',
'pdfjs/display/dom_utils'], factory);
} else if (typeof exports !== 'undefined') {
factory(exports, require('../shared/util.js'), require('./dom_utils.js'));
} else {
factory((root.pdfjsDisplayWebGL = {}), root.pdfjsSharedUtil,
root.pdfjsDisplayDOMUtils);
}
}(this, function (exports, sharedUtil, displayDOMUtils) {
var shadow = sharedUtil.shadow;
var getDefaultSetting = displayDOMUtils.getDefaultSetting;
import { getDefaultSetting } from './dom_utils';
import { shadow } from '../shared/util';
var WebGLUtils = (function WebGLUtilsClosure() {
function loadShader(gl, code, shaderType) {
@ -450,5 +436,6 @@ var WebGLUtils = (function WebGLUtilsClosure() {
};
})();
exports.WebGLUtils = WebGLUtils;
}));
export {
WebGLUtils,
};