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 ccc50a8a..e1231500 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -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}); }