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

@ -13,25 +13,8 @@
* limitations under the License.
*/
'use strict';
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('pdfjs/display/pattern_helper', ['exports', 'pdfjs/shared/util',
'pdfjs/display/webgl'], factory);
} else if (typeof exports !== 'undefined') {
factory(exports, require('../shared/util.js'), require('./webgl.js'));
} else {
factory((root.pdfjsDisplayPatternHelper = {}), root.pdfjsSharedUtil,
root.pdfjsDisplayWebGL);
}
}(this, function (exports, sharedUtil, displayWebGL) {
var Util = sharedUtil.Util;
var info = sharedUtil.info;
var isArray = sharedUtil.isArray;
var error = sharedUtil.error;
var WebGLUtils = displayWebGL.WebGLUtils;
import { error, info, isArray, Util } from '../shared/util';
import { WebGLUtils } from './webgl';
var ShadingIRs = {};
@ -448,6 +431,7 @@ var TilingPattern = (function TilingPatternClosure() {
return TilingPattern;
})();
exports.getShadingPatternFromIR = getShadingPatternFromIR;
exports.TilingPattern = TilingPattern;
}));
export {
getShadingPatternFromIR,
TilingPattern,
};