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.
This commit is contained in:
Chris Adams 2013-06-19 15:37:57 -04:00
parent 51bb8ca46e
commit adc4147304
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,6 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
/* global processDZIError:true */
(function( $ ){ (function( $ ){
@ -284,7 +283,7 @@ function configureFromXML( tileSource, xmlDoc ){
} else if ( rootName == "Collection" ) { } else if ( rootName == "Collection" ) {
throw new Error( $.getString( "Errors.Dzc" ) ); throw new Error( $.getString( "Errors.Dzc" ) );
} else if ( rootName == "Error" ) { } else if ( rootName == "Error" ) {
return processDZIError( root ); return $._processDZIError( root );
} }
throw new Error( $.getString( "Errors.Dzi" ) ); throw new Error( $.getString( "Errors.Dzi" ) );

View File

@ -1934,5 +1934,7 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
throw new Error(message); throw new Error(message);
} }
// Add an alias so this is in-scope for dzitilesource but obviously not a blessed public method:
$._processDZIError = processDZIError;
}( OpenSeadragon )); }( OpenSeadragon ));