Revert changes to ID field in configure

This commit is contained in:
Andrew Hankinson 2022-06-17 10:23:13 +02:00
parent 7a97d524f8
commit 86dabe624b

View File

@ -207,15 +207,13 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
if ( !$.isPlainObject(data) ) { if ( !$.isPlainObject(data) ) {
var options = configureFromXml10( data ); var options = configureFromXml10( data );
options['@context'] = "http://iiif.io/api/image/1.0/context.json"; options['@context'] = "http://iiif.io/api/image/1.0/context.json";
options._id = url.replace('/info.xml', ''); options["@id"] = url.replace('/info.xml', '');
options.version = 1; options.version = 1;
return options; return options;
} else { } else {
if ( !data['@context'] ) { if ( !data['@context'] ) {
data['@context'] = 'http://iiif.io/api/image/1.0/context.json'; data['@context'] = 'http://iiif.io/api/image/1.0/context.json';
data["@id"] = url.replace('/info.json', ''); data["@id"] = url.replace('/info.json', '');
// ensure the '@id' property is aliased to the internal "_id" property.
data._id = data["@id"];
data.version = 1; data.version = 1;
} else { } else {
var context = data['@context']; var context = data['@context'];