Define as an AMD module if available

This commit is contained in:
Gaspar Rey 2015-09-02 00:10:53 +01:00
parent ba80561e76
commit 00459189b1

View File

@ -682,11 +682,15 @@
* @returns {OpenSeadragon.Viewer} * @returns {OpenSeadragon.Viewer}
*/ */
window.OpenSeadragon = window.OpenSeadragon || function( options ){ window.OpenSeadragon = window.OpenSeadragon || function( options ){
return new OpenSeadragon.Viewer( options ); return new OpenSeadragon.Viewer( options );
}; };
if (typeof define === 'function' && define.amd) {
define(function () {
return (window.OpenSeadragon);
});
}
(function( $ ){ (function( $ ){