mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Merge pull request #465 from rlskoeser/ns-aware
Support dzi xml with namespaces in Firefox
This commit is contained in:
commit
8459750cf1
@ -222,6 +222,7 @@ function configureFromXML( tileSource, xmlDoc ){
|
||||
|
||||
var root = xmlDoc.documentElement,
|
||||
rootName = root.localName,
|
||||
ns = xmlDoc.documentElement.namespaceURI,
|
||||
configuration = null,
|
||||
displayRects = [],
|
||||
dispRectNodes,
|
||||
@ -233,7 +234,8 @@ function configureFromXML( tileSource, xmlDoc ){
|
||||
if ( rootName == "Image" ) {
|
||||
|
||||
try {
|
||||
sizeNode = root.getElementsByTagName( "Size" )[ 0 ];
|
||||
sizeNode = root.getElementsByTagNameNS(ns, "Size" )[ 0 ];
|
||||
|
||||
configuration = {
|
||||
Image: {
|
||||
xmlns: "http://schemas.microsoft.com/deepzoom/2008",
|
||||
@ -255,10 +257,11 @@ function configureFromXML( tileSource, xmlDoc ){
|
||||
);
|
||||
}
|
||||
|
||||
dispRectNodes = root.getElementsByTagName( "DisplayRect" );
|
||||
dispRectNodes = root.getElementsByTagNameNS(ns, "DisplayRect" );
|
||||
|
||||
for ( i = 0; i < dispRectNodes.length; i++ ) {
|
||||
dispRectNode = dispRectNodes[ i ];
|
||||
rectNode = dispRectNode.getElementsByTagName( "Rect" )[ 0 ];
|
||||
rectNode = dispRectNode.getElementsByTagNameNS(ns, "Rect" )[ 0 ];
|
||||
|
||||
displayRects.push({
|
||||
Rect: {
|
||||
|
Loading…
Reference in New Issue
Block a user