Merge branch 'master' into free-hand-rotation

This commit is contained in:
Dominik Picheta 2014-08-19 10:00:12 +01:00
commit a8b6c8d0e1
4 changed files with 7 additions and 6 deletions

View File

@ -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 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) * Fixed incorrect flick direction after image is rotated (#452)
* Debug mode now works with rotate images (#453) * Debug mode now works with rotate images (#453)
* Now supporting dzi xml with namespaces (#462)
1.1.1: 1.1.1:

View File

@ -107,7 +107,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
var ns; var ns;
if ( data.Image ) { if ( data.Image ) {
ns = data.Image.xmlns; ns = data.Image.xmlns;
} else if ( data.documentElement && "Image" == data.documentElement.tagName ) { } else if ( data.documentElement && "Image" == data.documentElement.localName ) {
ns = data.documentElement.namespaceURI; ns = data.documentElement.namespaceURI;
} }
@ -221,7 +221,7 @@ function configureFromXML( tileSource, xmlDoc ){
} }
var root = xmlDoc.documentElement, var root = xmlDoc.documentElement,
rootName = root.tagName, rootName = root.localName,
configuration = null, configuration = null,
displayRects = [], displayRects = [],
dispRectNodes, dispRectNodes,

View File

@ -50,6 +50,7 @@
$.Navigator = function( options ){ $.Navigator = function( options ){
var viewer = options.viewer, var viewer = options.viewer,
_this = this,
viewerSize, viewerSize,
navigatorSize, navigatorSize,
unneededElement; unneededElement;
@ -217,10 +218,9 @@ $.Navigator = function( options ){
if (options.navigatorRotate) if (options.navigatorRotate)
{ {
var _this = this;
options.viewer.addHandler("rotate", function (args) { options.viewer.addHandler("rotate", function (args) {
_setTransformRotate(_this.viewer.navigator.displayRegionContainer, args.degrees); _setTransformRotate(_this.displayRegionContainer, args.degrees);
_setTransformRotate(_this.viewer.navigator.displayRegion, -args.degrees); _setTransformRotate(_this.displayRegion, -args.degrees);
_this.viewport.setRotation(args.degrees); _this.viewport.setRotation(args.degrees);
}); });

View File

@ -739,7 +739,7 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
* @property {Number} degrees - The number of degrees the rotation was set to. * @property {Number} degrees - The number of degrees the rotation was set to.
* @property {?Object} userData - Arbitrary subscriber-defined object. * @property {?Object} userData - Arbitrary subscriber-defined object.
*/ */
if (this.viewer.navigator !== null) if (this.viewer !== null)
{ {
this.viewer.raiseEvent('rotate', {"degrees": degrees}); this.viewer.raiseEvent('rotate', {"degrees": degrees});
} }