From 55a05963a2f126389ea75138f809eb6f3f94e718 Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 2 Aug 2023 20:30:30 +0200 Subject: [PATCH] Sort N tiles always for a better look and feel. --- src/tiledimage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tiledimage.js b/src/tiledimage.js index 42319144..0bedb701 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -1930,8 +1930,8 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag return [tile]; } previousBest.push(tile); + this._sortTiles(previousBest); if (previousBest.length > maxNTiles) { - this._sortTiles(previousBest); previousBest.pop(); } return previousBest;