Sort N tiles always for a better look and feel.

This commit is contained in:
Peter 2023-08-02 20:30:30 +02:00
parent 13955b0bf6
commit 55a05963a2

View File

@ -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;