mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-01 07:31:41 +03:00
Update iiiftilesource.js
This commit is contained in:
parent
dde42b641d
commit
44a9d1b98b
@ -68,14 +68,20 @@ $.IIIFTileSource = function( options ){
|
|||||||
if (! options.maxLevel ) {
|
if (! options.maxLevel ) {
|
||||||
var mf = -1;
|
var mf = -1;
|
||||||
if ( this.scale_factor instanceof Array )
|
if ( this.scale_factor instanceof Array )
|
||||||
|
{
|
||||||
for ( var i = 0; i < this.scale_factor.length; i++ )
|
for ( var i = 0; i < this.scale_factor.length; i++ )
|
||||||
{
|
{
|
||||||
var cf = Number( this.scale_factor[i] );
|
var cf = Number( this.scale_factor[i] );
|
||||||
if ( !isNaN( cf ) && cf > mf ) mf = cf;
|
if ( !isNaN( cf ) && cf > mf ) {
|
||||||
|
mf = cf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( mf < 0 ) {
|
||||||
|
options.maxLevel = Number( Math.ceil( Math.log( Math.max( this.width, this.height ), 2 )));
|
||||||
|
} else {
|
||||||
|
options.maxLevel = mf;
|
||||||
}
|
}
|
||||||
if ( mf < 0 )
|
|
||||||
options.maxLevel = Number( Math.ceil( Math.log( Math.max( this.width, this.height ), 2 )))
|
|
||||||
else options.maxLevel = mf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$.TileSource.apply( this, [ options ] );
|
$.TileSource.apply( this, [ options ] );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user