This commit is contained in:
Dominik Picheta 2014-08-15 09:46:27 +01:00
parent 873135b492
commit 01303787ce
2 changed files with 4 additions and 4 deletions

View File

@ -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);
});

View File

@ -742,7 +742,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});
}