mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-20 09:41:45 +03:00
parent
d68999bc87
commit
dde42b641d
@ -65,10 +65,19 @@ $.IIIFTileSource = function( options ){
|
|||||||
// to preserve backward compatibility.
|
// to preserve backward compatibility.
|
||||||
options.tileSize = this.tile_width;
|
options.tileSize = this.tile_width;
|
||||||
|
|
||||||
options.maxLevel = options.maxLevel ? options.maxLevel : Number(
|
if (! options.maxLevel ) {
|
||||||
Math.ceil( Math.log( Math.max( this.width, this.height ), 2 ) )
|
var mf = -1;
|
||||||
);
|
if ( this.scale_factor instanceof Array )
|
||||||
|
for ( var i = 0; i < this.scale_factor.length; i++ )
|
||||||
|
{
|
||||||
|
var cf = Number( this.scale_factor[i] );
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
$.TileSource.apply( this, [ options ] );
|
$.TileSource.apply( this, [ options ] );
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -176,7 +185,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, {
|
|||||||
iiif_tile_h;
|
iiif_tile_h;
|
||||||
|
|
||||||
|
|
||||||
if ( level_width < this.tile_width || level_height < this.tile_height ){
|
if ( level_width < this.tile_width && level_height < this.tile_height ){
|
||||||
iiif_region = 'full';
|
iiif_region = 'full';
|
||||||
} else {
|
} else {
|
||||||
iiif_tile_x = x * iiif_tile_size_width;
|
iiif_tile_x = x * iiif_tile_size_width;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user