patch error while loading an image as tiled image where the highest zoom level can not be determined

This commit is contained in:
stefan.heinze 2024-03-12 13:47:59 +01:00
parent 67b9b16f6e
commit 01e58724a6

View File

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