mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Fix sorting logic for best tiles to load
This commit is contained in:
parent
49e2d7a987
commit
5be44521b5
@ -1651,8 +1651,8 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
||||
}
|
||||
|
||||
var result = this._updateTile(
|
||||
drawLevel,
|
||||
haveDrawn,
|
||||
drawLevel,
|
||||
flippedX, y,
|
||||
level,
|
||||
levelVisibility,
|
||||
@ -2183,9 +2183,11 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
||||
return -1;
|
||||
}
|
||||
if (a.visibility === b.visibility) {
|
||||
// sort by smallest squared distance
|
||||
return (a.squaredDistance - b.squaredDistance);
|
||||
} else {
|
||||
return (a.visibility - b.visibility);
|
||||
// sort by largest visibility value
|
||||
return (b.visibility - a.visibility);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user