mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06: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(
|
var result = this._updateTile(
|
||||||
drawLevel,
|
|
||||||
haveDrawn,
|
haveDrawn,
|
||||||
|
drawLevel,
|
||||||
flippedX, y,
|
flippedX, y,
|
||||||
level,
|
level,
|
||||||
levelVisibility,
|
levelVisibility,
|
||||||
@ -2183,9 +2183,11 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (a.visibility === b.visibility) {
|
if (a.visibility === b.visibility) {
|
||||||
|
// sort by smallest squared distance
|
||||||
return (a.squaredDistance - b.squaredDistance);
|
return (a.squaredDistance - b.squaredDistance);
|
||||||
} else {
|
} else {
|
||||||
return (a.visibility - b.visibility);
|
// sort by largest visibility value
|
||||||
|
return (b.visibility - a.visibility);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user