mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-19 17:21:50 +03:00
getClosestLevel refinement
This commit is contained in:
parent
1a60238c61
commit
82b1b3e599
@ -320,18 +320,20 @@ $.TileSource.prototype = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @function
|
* @function
|
||||||
|
* @returns {Number} The highest level in this tile source that can be contained in a single tile.
|
||||||
*/
|
*/
|
||||||
getClosestLevel: function() {
|
getClosestLevel: function() {
|
||||||
var i,
|
var i,
|
||||||
tiles;
|
tiles;
|
||||||
|
|
||||||
for( i = this.minLevel; i <= this.maxLevel; i++ ){
|
for (i = this.minLevel + 1; i <= this.maxLevel; i++){
|
||||||
tiles = this.getNumTiles( i );
|
tiles = this.getNumTiles(i);
|
||||||
if (tiles.x > 1 || tiles.y > 1) {
|
if (tiles.x > 1 || tiles.y > 1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Math.max( 0, i - 1 );
|
|
||||||
|
return i - 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user