mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Adds UMD headers to core, display and shared files.
This commit is contained in:
parent
1b5940edd2
commit
6b60c8f4db
54 changed files with 1876 additions and 572 deletions
|
@ -12,11 +12,40 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals assert, ColorSpace, DecodeStream, error, info, isArray, ImageKind,
|
||||
isStream, JpegStream, JpxImage, Name, Promise, Stream, warn */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/image', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/colorspace', 'pdfjs/core/stream',
|
||||
'pdfjs/core/jpx'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./colorspace.js'), require('./stream.js'),
|
||||
require('./jpx.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreImage = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreColorSpace, root.pdfjsCoreStream,
|
||||
root.pdfjsCoreJpx);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreColorSpace,
|
||||
coreStream, coreJpx) {
|
||||
|
||||
var ImageKind = sharedUtil.ImageKind;
|
||||
var assert = sharedUtil.assert;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var warn = sharedUtil.warn;
|
||||
var Name = corePrimitives.Name;
|
||||
var isStream = corePrimitives.isStream;
|
||||
var ColorSpace = coreColorSpace.ColorSpace;
|
||||
var DecodeStream = coreStream.DecodeStream;
|
||||
var Stream = coreStream.Stream;
|
||||
var JpegStream = coreStream.JpegStream;
|
||||
var JpxImage = coreJpx.JpxImage;
|
||||
|
||||
var PDFImage = (function PDFImageClosure() {
|
||||
/**
|
||||
* Decode the image in the main thread if it supported. Resovles the promise
|
||||
|
@ -672,3 +701,9 @@ var PDFImage = (function PDFImageClosure() {
|
|||
};
|
||||
return PDFImage;
|
||||
})();
|
||||
|
||||
exports.PDFImage = PDFImage;
|
||||
|
||||
// TODO refactor to remove dependency on colorspace.js
|
||||
coreColorSpace._setCoreImage(exports);
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue