From 7fb5744495fc24d2ab71af0a7501e23bf3f895db Mon Sep 17 00:00:00 2001 From: lcl45 Date: Wed, 24 May 2023 08:45:15 +0200 Subject: [PATCH] Resolved suggestions - Avoid useless parameters _navigatorRotate since it already exists within the navigator; - Automatically rotate the image in the demo page. --- src/navigator.js | 4 +--- test/demo/rotating-navigator-region.html | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/navigator.js b/src/navigator.js index 9bcbb376..0cee49a7 100644 --- a/src/navigator.js +++ b/src/navigator.js @@ -224,8 +224,6 @@ $.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); @@ -399,7 +397,7 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /* bottomright = this.viewport.pixelFromPointNoRotate(bounds.getBottomRight(), false) .minus( this.totalBorderWidths ); - if (!this._navigatorRotate) { + if (!this.navigatorRotate) { var degrees = viewport.getRotation(true); _setTransformRotate(this.displayRegion, -degrees); } diff --git a/test/demo/rotating-navigator-region.html b/test/demo/rotating-navigator-region.html index fc81bb22..1005f682 100644 --- a/test/demo/rotating-navigator-region.html +++ b/test/demo/rotating-navigator-region.html @@ -20,7 +20,6 @@