mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Improve code readability
This commit is contained in:
parent
8ae1edfd48
commit
07cb95e99b
@ -397,10 +397,12 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
|||||||
iiifQuality = "default." + this.tileFormat;
|
iiifQuality = "default." + this.tileFormat;
|
||||||
}
|
}
|
||||||
if ( levelWidth < tileWidth && levelHeight < tileHeight ){
|
if ( levelWidth < tileWidth && levelHeight < tileHeight ){
|
||||||
if ( this.version === 1 || levelWidth !== this.width ) {
|
if ( levelWidth === this.width && this.version !== 1 ) {
|
||||||
iiifSize = levelWidth + "," + ( this.version === 3 ? levelHeight : "" );
|
|
||||||
} else {
|
|
||||||
iiifSize = "max";
|
iiifSize = "max";
|
||||||
|
} else if ( this.version === 3 ) {
|
||||||
|
iiifSize = levelWidth + "," + levelHeight;
|
||||||
|
} else {
|
||||||
|
iiifSize = levelWidth + ",";
|
||||||
}
|
}
|
||||||
iiifRegion = 'full';
|
iiifRegion = 'full';
|
||||||
} else {
|
} else {
|
||||||
@ -417,8 +419,10 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
|||||||
iiifSizeH = Math.ceil( iiifTileH * scale );
|
iiifSizeH = Math.ceil( iiifTileH * scale );
|
||||||
if ( this.version !== 1 && iiifSizeW === this.width && ( this.version !== 3 || iiifSizeH === this.height ) ) {
|
if ( this.version !== 1 && iiifSizeW === this.width && ( this.version !== 3 || iiifSizeH === this.height ) ) {
|
||||||
iiifSize = "max";
|
iiifSize = "max";
|
||||||
|
} else if (this.version === 3) {
|
||||||
|
iiifSize = iiifSizeW + "," + iiifSizeH;
|
||||||
} else {
|
} else {
|
||||||
iiifSize = iiifSizeW + "," + ( this.version === 3 ? iiifSizeH : "" );
|
iiifSize = iiifSizeW + ",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uri = [ this['@id'], iiifRegion, iiifSize, IIIF_ROTATION, iiifQuality ].join( '/' );
|
uri = [ this['@id'], iiifRegion, iiifSize, IIIF_ROTATION, iiifQuality ].join( '/' );
|
||||||
|
Loading…
Reference in New Issue
Block a user