mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-18 07:43:13 +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)) {
|
if (Array.isArray(context)) {
|
||||||
for (var i = 0; i < context.length; i++) {
|
for (var i = 0; i < context.length; i++) {
|
||||||
if (typeof context[i] === 'string' &&
|
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[i] === 'http://library.stanford.edu/iiif/image-api/1.1/context.json' ) ) {
|
||||||
context = context[i];
|
context = context[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (data['@context']) {
|
switch (context) {
|
||||||
case 'http://iiif.io/api/image/1/context.json':
|
case 'http://iiif.io/api/image/1/context.json':
|
||||||
case 'http://library.stanford.edu/iiif/image-api/1.1/context.json':
|
case 'http://library.stanford.edu/iiif/image-api/1.1/context.json':
|
||||||
data.version = 1;
|
data.version = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user