diff --git a/src/navigator.js b/src/navigator.js index 9d2cf6b7..9bcbb376 100644 --- a/src/navigator.js +++ b/src/navigator.js @@ -224,6 +224,8 @@ $.Navigator = function( options ){ this.displayRegionContainer.appendChild(this.displayRegion); this.element.getElementsByTagName('div')[0].appendChild(this.displayRegionContainer); + this._navigatorRotate = options.navigatorRotate; + function rotate(degrees, immediately) { _setTransformRotate(_this.displayRegionContainer, degrees); _setTransformRotate(_this.displayRegion, -degrees); @@ -397,6 +399,11 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /* bottomright = this.viewport.pixelFromPointNoRotate(bounds.getBottomRight(), false) .minus( this.totalBorderWidths ); + if (!this._navigatorRotate) { + var degrees = viewport.getRotation(true); + _setTransformRotate(this.displayRegion, -degrees); + } + //update style for navigator-box var style = this.displayRegion.style; style.display = this.world.getItemCount() ? 'block' : 'none'; diff --git a/test/demo/rotating-navigator-region.html b/test/demo/rotating-navigator-region.html new file mode 100644 index 00000000..fc81bb22 --- /dev/null +++ b/test/demo/rotating-navigator-region.html @@ -0,0 +1,34 @@ + + +
+