mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-18 07:43:13 +03:00
Fixed for older JavaScript
This commit is contained in:
parent
2608b48ed5
commit
f90d9814d5
@ -145,7 +145,9 @@ $.IIIFTileSource = function( options ){
|
|||||||
if( this.sizes ) {
|
if( this.sizes ) {
|
||||||
var sizeLength = this.sizes.length;
|
var sizeLength = this.sizes.length;
|
||||||
if ( (sizeLength === options.maxLevel) || (sizeLength === options.maxLevel + 1) ) {
|
if ( (sizeLength === options.maxLevel) || (sizeLength === options.maxLevel + 1) ) {
|
||||||
this.levelSizes = this.sizes.slice().sort(( size1, size2 ) => size1.width - size2.width);
|
this.levelSizes = this.sizes.slice().sort(function( size1, size2 ) {
|
||||||
|
return size1.width - size2.width;
|
||||||
|
});
|
||||||
// Need to take into account that the list may or may not include the full resolution size
|
// Need to take into account that the list may or may not include the full resolution size
|
||||||
if( sizeLength === options.maxLevel ) {
|
if( sizeLength === options.maxLevel ) {
|
||||||
this.levelSizes.push( {width: this.width, height: this.height} );
|
this.levelSizes.push( {width: this.width, height: this.height} );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user