From d6c3ccfd312420a0e0e76093dc051ba36bd62104 Mon Sep 17 00:00:00 2001 From: Rob Sanderson Date: Thu, 4 Sep 2014 12:04:31 -0700 Subject: [PATCH] scale_factors -> scaleFactors in 2.0 API --- src/iiiftilesource.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/iiiftilesource.js b/src/iiiftilesource.js index 8c1da291..c3c1fcd5 100644 --- a/src/iiiftilesource.js +++ b/src/iiiftilesource.js @@ -54,6 +54,7 @@ $.IIIFTileSource = function( options ){ options.tileSizePerScaleFactor = {}; + // N.B. 2.0 renamed scale_factors to scaleFactors if ( this.tile_width ) { options.tileSize = this.tile_width; } else if ( this.tile_height ) { @@ -62,13 +63,13 @@ $.IIIFTileSource = function( options ){ // Version 2.0 forwards if ( this.tiles.length == 1 ) { options.tileSize = this.tiles[0].width; - this.scale_factors = this.tiles[0].scale_factors; + this.scale_factors = this.tiles[0].scaleFactors; } else { // Multiple tile sizes at different levels this.scale_factors = []; for (var t = 0; t < this.tiles.length; t++ ) { - for (var sf = 0; sf < this.tiles[t].scale_factors.length; sf++) { - var scaleFactor = this.tiles[t].scale_factors[sf]; + for (var sf = 0; sf < this.tiles[t].scaleFactors.length; sf++) { + var scaleFactor = this.tiles[t].scaleFactors[sf]; this.scale_factors.push(scaleFactor); options.tileSizePerScaleFactor[scaleFactor] = this.tiles[t].width; }