From adc41473048434de5dc437f34ff3921d140103b6 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Wed, 19 Jun 2013 15:37:57 -0400 Subject: [PATCH] Expose semi-private processDZIError for use by DziTileSource This previously wasn't in scope outside of the main OpenSeadragon closure. Now it's exposed with an underscore prefix to encourage people not to think of it as a public interface. --- src/dzitilesource.js | 3 +-- src/openseadragon.js | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dzitilesource.js b/src/dzitilesource.js index 9410ee68..1bdfa9cf 100644 --- a/src/dzitilesource.js +++ b/src/dzitilesource.js @@ -31,7 +31,6 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* global processDZIError:true */ (function( $ ){ @@ -284,7 +283,7 @@ function configureFromXML( tileSource, xmlDoc ){ } else if ( rootName == "Collection" ) { throw new Error( $.getString( "Errors.Dzc" ) ); } else if ( rootName == "Error" ) { - return processDZIError( root ); + return $._processDZIError( root ); } throw new Error( $.getString( "Errors.Dzi" ) ); diff --git a/src/openseadragon.js b/src/openseadragon.js index 4f0e5bce..0bd32ba5 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -1934,5 +1934,7 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){ throw new Error(message); } + // Add an alias so this is in-scope for dzitilesource but obviously not a blessed public method: + $._processDZIError = processDZIError; }( OpenSeadragon ));