Merge pull request #13 from Ventero/fixes

Allow different Deep Zoom schema namespaces.
This commit is contained in:
iangilman 2013-01-16 13:31:00 -08:00
commit 1331530cb6
2 changed files with 18 additions and 20 deletions

View File

@ -5659,17 +5659,16 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, {
* @param {String} optional - url
*/
supports: function( data, url ){
return (
data.Image &&
"http://schemas.microsoft.com/deepzoom/2008" == data.Image.xmlns
) || (
data.documentElement &&
"Image" == data.documentElement.tagName &&
"http://schemas.microsoft.com/deepzoom/2008" ==
data.documentElement.namespaceURI
);
},
var ns;
if ( data.Image ) {
ns = data.Image.xmlns;
} else if ( data.documentElement && "Image" == data.documentElement.tagName ) {
ns = data.documentElement.namespaceURI;
}
return ( "http://schemas.microsoft.com/deepzoom/2008" == ns ||
"http://schemas.microsoft.com/deepzoom/2009" == ns );
},
/**
*

View File

@ -69,17 +69,16 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, {
* @param {String} optional - url
*/
supports: function( data, url ){
return (
data.Image &&
"http://schemas.microsoft.com/deepzoom/2008" == data.Image.xmlns
) || (
data.documentElement &&
"Image" == data.documentElement.tagName &&
"http://schemas.microsoft.com/deepzoom/2008" ==
data.documentElement.namespaceURI
);
},
var ns;
if ( data.Image ) {
ns = data.Image.xmlns;
} else if ( data.documentElement && "Image" == data.documentElement.tagName ) {
ns = data.documentElement.namespaceURI;
}
return ( "http://schemas.microsoft.com/deepzoom/2008" == ns ||
"http://schemas.microsoft.com/deepzoom/2009" == ns );
},
/**
*