From e73ed421e4fe60c2ab8cae201c7796b0d10ed2fa Mon Sep 17 00:00:00 2001 From: thatcher Date: Mon, 27 Feb 2012 16:50:22 -0500 Subject: [PATCH] prefixUrl configuration option was mangled as prefixURL in OpenSeadragon.Button leading to general inconsistency. --- openseadragon.js | 17 +++++++++-------- src/button.js | 8 ++++---- src/viewer.js | 9 +++++---- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/openseadragon.js b/openseadragon.js index fe35d1b8..f94d73c5 100644 --- a/openseadragon.js +++ b/openseadragon.js @@ -2461,8 +2461,7 @@ $.Viewer = function( options ) { $.extend( true, this, { id: options.id, xmlPath: null, - dzis: null, - images: null, + tileSources: null, prefixUrl: '', controls: [], overlays: [], @@ -2726,8 +2725,10 @@ $.Viewer = function( options ) { if ( this.xmlPath ){ //Deprecated option. Now it is preferred to use the tileSources option - this.openDzi( this.xmlPath ); - } else if ( this.tileSources ){ + this.tileSources = [ this.xmlPath ]; + } + + if ( this.tileSources ){ //tileSource is a complex option... //It can be a string, object, function, or an array of any of these. //A string implies a DZI @@ -4199,10 +4200,10 @@ $.Button = function( options ) { this.config.clickTimeThreshold, this.config.clickDistThreshold ); - this.imgRest = $.makeTransparentImage( this.config.prefixURL + this.srcRest ); - this.imgGroup = $.makeTransparentImage( this.config.prefixURL + this.srcGroup ); - this.imgHover = $.makeTransparentImage( this.config.prefixURL + this.srcHover ); - this.imgDown = $.makeTransparentImage( this.config.prefixURL + this.srcDown ); + this.imgRest = $.makeTransparentImage( this.config.prefixUrl + this.srcRest ); + this.imgGroup = $.makeTransparentImage( this.config.prefixUrl + this.srcGroup ); + this.imgHover = $.makeTransparentImage( this.config.prefixUrl + this.srcHover ); + this.imgDown = $.makeTransparentImage( this.config.prefixUrl + this.srcDown ); this.fadeDelay = 0; // begin fading immediately this.fadeLength = 2000; // fade over a period of 2 seconds diff --git a/src/button.js b/src/button.js index 81638473..36000f83 100644 --- a/src/button.js +++ b/src/button.js @@ -88,10 +88,10 @@ $.Button = function( options ) { this.config.clickTimeThreshold, this.config.clickDistThreshold ); - this.imgRest = $.makeTransparentImage( this.config.prefixURL + this.srcRest ); - this.imgGroup = $.makeTransparentImage( this.config.prefixURL + this.srcGroup ); - this.imgHover = $.makeTransparentImage( this.config.prefixURL + this.srcHover ); - this.imgDown = $.makeTransparentImage( this.config.prefixURL + this.srcDown ); + this.imgRest = $.makeTransparentImage( this.config.prefixUrl + this.srcRest ); + this.imgGroup = $.makeTransparentImage( this.config.prefixUrl + this.srcGroup ); + this.imgHover = $.makeTransparentImage( this.config.prefixUrl + this.srcHover ); + this.imgDown = $.makeTransparentImage( this.config.prefixUrl + this.srcDown ); this.fadeDelay = 0; // begin fading immediately this.fadeLength = 2000; // fade over a period of 2 seconds diff --git a/src/viewer.js b/src/viewer.js index e69d8819..99301026 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -51,8 +51,7 @@ $.Viewer = function( options ) { $.extend( true, this, { id: options.id, xmlPath: null, - dzis: null, - images: null, + tileSources: null, prefixUrl: '', controls: [], overlays: [], @@ -316,8 +315,10 @@ $.Viewer = function( options ) { if ( this.xmlPath ){ //Deprecated option. Now it is preferred to use the tileSources option - this.openDzi( this.xmlPath ); - } else if ( this.tileSources ){ + this.tileSources = [ this.xmlPath ]; + } + + if ( this.tileSources ){ //tileSource is a complex option... //It can be a string, object, function, or an array of any of these. //A string implies a DZI