Skip to content

Commit e1af43a

Browse files
committed
updated package.json
1 parent c243e6c commit e1af43a

File tree

2 files changed

+54
-30
lines changed

2 files changed

+54
-30
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"key-codes": "edsilv/key-codes",
5252
"less": "^2.4.0",
5353
"lodash": "^3.1.0",
54-
"manifold": "viewdir/manifold#v1.1.11",
54+
"manifold": "viewdir/manifold#v1.1.12",
5555
"ncp": "^2.0.0",
5656
"openseadragon": "^2.2.1",
5757
"protractor": "1.3.1",

src/lib/bundle.js

Lines changed: 53 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13983,6 +13983,7 @@ function extend() {
1398313983
},{}]},{},[1])(1)
1398413984
});
1398513985
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.manifold = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
13986+
(function (global){
1398613987
var Manifold;
1398713988
(function (Manifold) {
1398813989
var StringValue = (function () {
@@ -14039,34 +14040,36 @@ var Manifold;
1403914040
Bootstrapper.prototype.bootstrap = function () {
1404014041
var that = this;
1404114042
return new Promise(function (resolve, reject) {
14042-
var msie = that._msieversion();
14043-
// if not a recent version of IE
14044-
if (msie > 0 && msie < 11) {
14045-
if (msie === 9) {
14046-
// CORS not available, use jsonp
14047-
var settings = {
14048-
url: that._options.iiifResourceUri,
14049-
type: 'GET',
14050-
dataType: 'jsonp',
14051-
jsonp: 'callback',
14052-
jsonpCallback: 'manifestCallback'
14053-
};
14054-
$.ajax(settings);
14055-
window.manifestCallback = function (json) {
14056-
that._loaded(that, JSON.stringify(json), resolve, reject);
14057-
};
14058-
}
14059-
else if (msie === 10) {
14060-
$.getJSON(that._options.iiifResourceUri, function (json) {
14061-
that._loaded(that, JSON.stringify(json), resolve, reject);
14062-
});
14063-
}
14064-
}
14065-
else {
14043+
var msie = that._detectIE();
14044+
if (msie === false) {
1406614045
manifesto.loadManifest(that._options.iiifResourceUri).then(function (json) {
1406714046
that._loaded(that, json, resolve, reject);
1406814047
});
1406914048
}
14049+
else {
14050+
// if not a recent version of IE
14051+
if (msie > 0) {
14052+
if (msie === 9) {
14053+
// CORS not available, use jsonp
14054+
var settings = {
14055+
url: that._options.iiifResourceUri,
14056+
type: 'GET',
14057+
dataType: 'jsonp',
14058+
jsonp: 'callback',
14059+
jsonpCallback: 'manifestCallback'
14060+
};
14061+
$.ajax(settings);
14062+
global.manifestCallback = function (json) {
14063+
that._loaded(that, JSON.stringify(json), resolve, reject);
14064+
};
14065+
}
14066+
else {
14067+
$.getJSON(that._options.iiifResourceUri, function (json) {
14068+
that._loaded(that, JSON.stringify(json), resolve, reject);
14069+
});
14070+
}
14071+
}
14072+
}
1407014073
});
1407114074
};
1407214075
Bootstrapper.prototype._loaded = function (bootstrapper, json, resolve, reject) {
@@ -14115,15 +14118,35 @@ var Manifold;
1411514118
resolve(helper);
1411614119
}
1411714120
};
14118-
Bootstrapper.prototype._msieversion = function () {
14121+
Bootstrapper.prototype._detectIE = function () {
1411914122
var ua = window.navigator.userAgent;
14120-
var msie = ua.indexOf("MSIE ");
14123+
// Test values; Uncomment to check result …
14124+
// IE 10
14125+
// ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';
14126+
// IE 11
14127+
// ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';
14128+
// Edge 12 (Spartan)
14129+
// ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';
14130+
// Edge 13
14131+
// ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';
14132+
var msie = ua.indexOf('MSIE ');
1412114133
if (msie > 0) {
14122-
return parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)));
14134+
// IE 10 or older => return version number
14135+
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
1412314136
}
14124-
else {
14125-
return 0;
14137+
var trident = ua.indexOf('Trident/');
14138+
if (trident > 0) {
14139+
// IE 11 => return version number
14140+
var rv = ua.indexOf('rv:');
14141+
return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
14142+
}
14143+
var edge = ua.indexOf('Edge/');
14144+
if (edge > 0) {
14145+
// Edge (IE 12+) => return version number
14146+
return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
1412614147
}
14148+
// other browser
14149+
return false;
1412714150
};
1412814151
return Bootstrapper;
1412914152
}());
@@ -15093,6 +15116,7 @@ var Manifold;
1509315116
Manifold.UriLabeller = UriLabeller;
1509415117
})(Manifold || (Manifold = {}));
1509515118

15119+
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
1509615120
},{}]},{},[1])(1)
1509715121
});
1509815122
(function(t,e,o){"use strict";function r(t,e,r,p){r=r||"width";var n,l,m,c=(e.match(s)||[])[2],f="px"===c?1:d[c+"toPx"],u=/r?em/i;if(f||u.test(c)&&!p)t=f?t:"rem"===c?i:"fontSize"===r?t.parentNode||t:t,f=f||parseFloat(a(t,"fontSize")),m=parseFloat(e)*f;else{n=t.style,l=n[r];try{n[r]=e}catch(x){return 0}m=n[r]?parseFloat(a(t,r)):0,n[r]=l!==o?l:null}return m}function a(t,e){var o,n,i,l,d,c=/^top|bottom/,f=["paddingTop","paddingBottom","borderTop","borderBottom"],u=4;if(o=m?m(t)[e]:(n=t.style["pixel"+e.charAt(0).toUpperCase()+e.slice(1)])?n+"px":"fontSize"===e?r(t,"1em","left",1)+"px":t.currentStyle[e],i=(o.match(s)||[])[2],"%"===i&&p)if(c.test(e)){for(l=(d=t.parentNode||t).offsetHeight;u--;)l-=parseFloat(a(d,f[u]));o=parseFloat(o)/100*l+"px"}else o=r(t,o);else("auto"===o||i&&"px"!==i)&&m?o=0:i&&"px"!==i&&!m&&(o=r(t,o)+"px");return o}var p,n=e.createElement("test"),i=e.documentElement,l=e.defaultView,m=l&&l.getComputedStyle,s=/^(-?[\d+\.\-]+)([a-z]+|%)$/i,d={},c=[1/25.4,1/2.54,1/72,1/6],f=["mm","cm","pt","pc","in","mozmm"],u=6;for(i.appendChild(n),m&&(n.style.marginTop="1%",p="1%"===m(n).marginTop);u--;)d[f[u]+"toPx"]=c[u]?c[u]*d.inToPx:r(n,"1"+f[u]);i.removeChild(n),n=o,t.Length={toPx:r}})(this,this.document);

0 commit comments

Comments
 (0)