mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Fix error in IIIF version detection
This commit is contained in:
parent
e851620df4
commit
456567af59
@ -215,14 +215,14 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
||||
if (Array.isArray(context)) {
|
||||
for (var i = 0; i < context.length; i++) {
|
||||
if (typeof context[i] === 'string' &&
|
||||
( /^http:\/\/iiif\.io\/api\/image\/[0-2]\/context\.json$/.test(context[i]) ||
|
||||
( /^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(context[i]) ||
|
||||
context[i] === 'http://library.stanford.edu/iiif/image-api/1.1/context.json' ) ) {
|
||||
context = context[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (data['@context']) {
|
||||
switch (context) {
|
||||
case 'http://iiif.io/api/image/1/context.json':
|
||||
case 'http://library.stanford.edu/iiif/image-api/1.1/context.json':
|
||||
data.version = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user