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,24 +13,8 @@
* limitations under the License.
*/
'use strict';
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('pdfjs/display/text_layer', ['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.pdfjsDisplayTextLayer = {}), root.pdfjsSharedUtil,
root.pdfjsDisplayDOMUtils);
}
}(this, function (exports, sharedUtil, displayDOMUtils) {
var Util = sharedUtil.Util;
var createPromiseCapability = sharedUtil.createPromiseCapability;
var CustomStyle = displayDOMUtils.CustomStyle;
var getDefaultSetting = displayDOMUtils.getDefaultSetting;
import { createPromiseCapability, Util } from '../shared/util';
import { CustomStyle, getDefaultSetting } from './dom_utils';
/**
* Text layer render parameters.
@ -639,5 +623,6 @@ var renderTextLayer = (function renderTextLayerClosure() {
return renderTextLayer;
})();
exports.renderTextLayer = renderTextLayer;
}));
export {
renderTextLayer,
};