mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 22:56:11 +03:00
Improve clarity and remove error in IIIF size param determination
This commit is contained in:
parent
07cb95e99b
commit
ddf42bf224
@ -397,7 +397,9 @@ $.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 ( levelWidth === this.width && this.version !== 1 ) {
|
if ( this.version === 2 && levelWidth === this.width ) {
|
||||||
|
iiifSize = "max";
|
||||||
|
} else if ( this.version === 3 && levelWidth === this.width && levelHeight === this.height ) {
|
||||||
iiifSize = "max";
|
iiifSize = "max";
|
||||||
} else if ( this.version === 3 ) {
|
} else if ( this.version === 3 ) {
|
||||||
iiifSize = levelWidth + "," + levelHeight;
|
iiifSize = levelWidth + "," + levelHeight;
|
||||||
@ -417,7 +419,9 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
|||||||
}
|
}
|
||||||
iiifSizeW = Math.ceil( iiifTileW * scale );
|
iiifSizeW = Math.ceil( iiifTileW * scale );
|
||||||
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 === 2 && iiifSizeW === this.width ) {
|
||||||
|
iiifSize = "max";
|
||||||
|
} else if ( this.version === 3 && iiifSizeW === this.width && iiifSizeH === this.height ) {
|
||||||
iiifSize = "max";
|
iiifSize = "max";
|
||||||
} else if (this.version === 3) {
|
} else if (this.version === 3) {
|
||||||
iiifSize = iiifSizeW + "," + iiifSizeH;
|
iiifSize = iiifSizeW + "," + iiifSizeH;
|
||||||
|
Loading…
Reference in New Issue
Block a user