Merge pull request #2644 from RationAI/feat/import

Import Openseadragon Dynamically
This commit is contained in:
Ian Gilman 2025-01-10 09:51:54 -08:00 committed by GitHub
commit ffe12888cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3024,17 +3024,23 @@ function OpenSeadragon( options ){
// Universal Module Definition, supports CommonJS, AMD and simple script tag
(function (root, factory) {
(function (root, $) {
if (typeof define === 'function' && define.amd) {
// expose as amd module
define([], factory);
define([], function () {
return $;
});
} else if (typeof module === 'object' && module.exports) {
// expose as commonjs module
module.exports = factory();
module.exports = $;
} else {
if (!root) {
root = typeof window === 'object' && window;
if (!root) {
$.console.error("OpenSeadragon must run in browser environment!");
}
}
// expose as window.OpenSeadragon
root.OpenSeadragon = factory();
root.OpenSeadragon = $;
}
}(this, function () {
return OpenSeadragon;
}));
}(this, OpenSeadragon));