From 01e58724a60799b71250deea33da3ac6c8116a8e Mon Sep 17 00:00:00 2001 From: "stefan.heinze" Date: Tue, 12 Mar 2024 13:47:59 +0100 Subject: [PATCH] patch error while loading an image as tiled image where the highest zoom level can not be determined --- src/tiledimage.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/tiledimage.js b/src/tiledimage.js index 0c666f1e..6ff3273c 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -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,