mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
scale_factors -> scaleFactors in 2.0 API
This commit is contained in:
parent
bcb16de02b
commit
d6c3ccfd31
@ -54,6 +54,7 @@ $.IIIFTileSource = function( options ){
|
|||||||
|
|
||||||
options.tileSizePerScaleFactor = {};
|
options.tileSizePerScaleFactor = {};
|
||||||
|
|
||||||
|
// N.B. 2.0 renamed scale_factors to scaleFactors
|
||||||
if ( this.tile_width ) {
|
if ( this.tile_width ) {
|
||||||
options.tileSize = this.tile_width;
|
options.tileSize = this.tile_width;
|
||||||
} else if ( this.tile_height ) {
|
} else if ( this.tile_height ) {
|
||||||
@ -62,13 +63,13 @@ $.IIIFTileSource = function( options ){
|
|||||||
// Version 2.0 forwards
|
// Version 2.0 forwards
|
||||||
if ( this.tiles.length == 1 ) {
|
if ( this.tiles.length == 1 ) {
|
||||||
options.tileSize = this.tiles[0].width;
|
options.tileSize = this.tiles[0].width;
|
||||||
this.scale_factors = this.tiles[0].scale_factors;
|
this.scale_factors = this.tiles[0].scaleFactors;
|
||||||
} else {
|
} else {
|
||||||
// Multiple tile sizes at different levels
|
// Multiple tile sizes at different levels
|
||||||
this.scale_factors = [];
|
this.scale_factors = [];
|
||||||
for (var t = 0; t < this.tiles.length; t++ ) {
|
for (var t = 0; t < this.tiles.length; t++ ) {
|
||||||
for (var sf = 0; sf < this.tiles[t].scale_factors.length; sf++) {
|
for (var sf = 0; sf < this.tiles[t].scaleFactors.length; sf++) {
|
||||||
var scaleFactor = this.tiles[t].scale_factors[sf];
|
var scaleFactor = this.tiles[t].scaleFactors[sf];
|
||||||
this.scale_factors.push(scaleFactor);
|
this.scale_factors.push(scaleFactor);
|
||||||
options.tileSizePerScaleFactor[scaleFactor] = this.tiles[t].width;
|
options.tileSizePerScaleFactor[scaleFactor] = this.tiles[t].width;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user