mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Sort the N tiles only once instead of when adding new indiviual tiles
This commit is contained in:
parent
55a05963a2
commit
f8ad0acfa4
@ -1437,6 +1437,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
||||
}
|
||||
}
|
||||
|
||||
this._sortTiles(best);
|
||||
return best;
|
||||
},
|
||||
|
||||
@ -1930,8 +1931,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;
|
||||
|
Loading…
Reference in New Issue
Block a user