Making the DziTileSource honor minLevel.

This commit is contained in:
Ian Gilman 2018-07-03 09:40:10 -07:00
parent 68d08d8748
commit 452e50c8d8
2 changed files with 5 additions and 0 deletions

View File

@ -182,6 +182,10 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
yMax, yMax,
i; i;
if ((this.minLevel && level < this.minLevel) || (this.maxLevel && level > this.maxLevel)) {
return false;
}
if ( !rects || !rects.length ) { if ( !rects || !rects.length ) {
return true; return true;
} }

View File

@ -972,6 +972,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
// Calculations for the interval of levels to draw // Calculations for the interval of levels to draw
// can return invalid intervals; fix that here if necessary // can return invalid intervals; fix that here if necessary
highestLevel = Math.max(highestLevel, this.source.minLevel);
lowestLevel = Math.min(lowestLevel, highestLevel); lowestLevel = Math.min(lowestLevel, highestLevel);
return { return {
lowestLevel: lowestLevel, lowestLevel: lowestLevel,