mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-24 22:26:10 +03:00
Fixed: remove redundant checks
Also fixes a JSDoc error for annotating optional parameters.
This commit is contained in:
parent
d35c0a6385
commit
1b777c9e62
@ -150,7 +150,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
|||||||
* this tile source.
|
* this tile source.
|
||||||
* @function
|
* @function
|
||||||
* @param {Object|Array} data
|
* @param {Object|Array} data
|
||||||
* @param {String} optional - url
|
* @param {String} [url] - url
|
||||||
*/
|
*/
|
||||||
|
|
||||||
supports: function( data, url ) {
|
supports: function( data, url ) {
|
||||||
@ -249,13 +249,6 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// normalize the various possible id properties to an internal one
|
|
||||||
data._id = data["@id"] || data["id"] || data['identifier'] || null;
|
|
||||||
|
|
||||||
if (!data._id) {
|
|
||||||
throw new Error( 'Could not determine a property for the tile source ID.' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.preferredFormats) {
|
if (data.preferredFormats) {
|
||||||
for (var f = 0; f < data.preferredFormats.length; f++ ) {
|
for (var f = 0; f < data.preferredFormats.length; f++ ) {
|
||||||
if ( OpenSeadragon.imageFormatSupported(data.preferredFormats[f]) ) {
|
if ( OpenSeadragon.imageFormatSupported(data.preferredFormats[f]) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user