diff --git a/changelog.txt b/changelog.txt index dd80da47..16574a7a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -13,6 +13,7 @@ OPENSEADRAGON CHANGELOG * Fixed MouseTracker cross-browser issues with tracking pointers over and out of the tracked element (pull request #448, fix for #152, #404, #420, and #427) * Fixed incorrect flick direction after image is rotated (#452) * Debug mode now works with rotate images (#453) +* Now supporting dzi xml with namespaces (#462) 1.1.1: diff --git a/src/dzitilesource.js b/src/dzitilesource.js index 5ef2585e..f5b75d69 100644 --- a/src/dzitilesource.js +++ b/src/dzitilesource.js @@ -107,7 +107,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead var ns; if ( data.Image ) { ns = data.Image.xmlns; - } else if ( data.documentElement && "Image" == data.documentElement.tagName ) { + } else if ( data.documentElement && "Image" == data.documentElement.localName ) { ns = data.documentElement.namespaceURI; } @@ -221,7 +221,7 @@ function configureFromXML( tileSource, xmlDoc ){ } var root = xmlDoc.documentElement, - rootName = root.tagName, + rootName = root.localName, configuration = null, displayRects = [], dispRectNodes, diff --git a/src/navigator.js b/src/navigator.js index 6910ae0c..d07a2bba 100644 --- a/src/navigator.js +++ b/src/navigator.js @@ -50,6 +50,7 @@ $.Navigator = function( options ){ var viewer = options.viewer, + _this = this, viewerSize, navigatorSize, unneededElement; @@ -217,10 +218,9 @@ $.Navigator = function( options ){ if (options.navigatorRotate) { - var _this = this; options.viewer.addHandler("rotate", function (args) { - _setTransformRotate(_this.viewer.navigator.displayRegionContainer, args.degrees); - _setTransformRotate(_this.viewer.navigator.displayRegion, -args.degrees); + _setTransformRotate(_this.displayRegionContainer, args.degrees); + _setTransformRotate(_this.displayRegion, -args.degrees); _this.viewport.setRotation(args.degrees); }); diff --git a/src/viewport.js b/src/viewport.js index fb64c1df..02b262f8 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -739,7 +739,7 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{ * @property {Number} degrees - The number of degrees the rotation was set to. * @property {?Object} userData - Arbitrary subscriber-defined object. */ - if (this.viewer.navigator !== null) + if (this.viewer !== null) { this.viewer.raiseEvent('rotate', {"degrees": degrees}); }