From c1c1d480dd9e61c81cf3960ed166a78faf2325b2 Mon Sep 17 00:00:00 2001 From: Richard Benjamin Allen Date: Tue, 16 Jul 2024 08:38:39 +0100 Subject: [PATCH] Fixed: Try renaming to something more descriptive --- src/openseadragon.js | 8 ++++---- src/overlay.js | 2 +- src/viewer.js | 38 +++++++++++++++++++------------------- test/demo/overlay.html | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index 5207de83..1510883a 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -230,10 +230,10 @@ * @property {Boolean} [flipped=false] * Initial flip state. * - * @property {Boolean} [overlayFlipReversal=true] + * @property {Boolean} [overlayPreserveContentDirection=true] * When the viewport is flipped (by pressing 'f'), the overlay is flipped using ScaleX. * Normally, this setting (default true) keeps the overlay's content readable by flipping it back. - * To make the content flip with the overlay, set overlayFlipReversal to false. + * To make the content flip with the overlay, set overlayPreserveContentDirection to false. * * @property {Number} [minZoomLevel=null] * @@ -1341,8 +1341,8 @@ function OpenSeadragon( options ){ degrees: 0, // INITIAL FLIP STATE - flipped: false, - overlayFlipReversal: true, + flipped: false, + overlayPreserveContentDirection: true, // APPEARANCE opacity: 1, diff --git a/src/overlay.js b/src/overlay.js index f555d6b9..7d485d42 100644 --- a/src/overlay.js +++ b/src/overlay.js @@ -259,7 +259,7 @@ var position = positionAndSize.position; var size = this.size = positionAndSize.size; var outerScale = ""; - if (viewport.overlayContentFlipped) { + if (viewport.overlayPreserveContentDirection) { outerScale = viewport.flipped ? " scaleX(-1)" : " scaleX(1)"; } var rotate = viewport.flipped ? -positionAndSize.rotate : positionAndSize.rotate; diff --git a/src/viewer.js b/src/viewer.js index b918fab3..97645294 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -383,25 +383,25 @@ $.Viewer = function( options ) { // Create the viewport this.viewport = new $.Viewport({ - containerSize: THIS[ this.hash ].prevContainerSize, - springStiffness: this.springStiffness, - animationTime: this.animationTime, - minZoomImageRatio: this.minZoomImageRatio, - maxZoomPixelRatio: this.maxZoomPixelRatio, - visibilityRatio: this.visibilityRatio, - wrapHorizontal: this.wrapHorizontal, - wrapVertical: this.wrapVertical, - defaultZoomLevel: this.defaultZoomLevel, - minZoomLevel: this.minZoomLevel, - maxZoomLevel: this.maxZoomLevel, - viewer: this, - degrees: this.degrees, - flipped: this.flipped, - overlayContentFlipped: this.overlayContentFlipped, - navigatorRotate: this.navigatorRotate, - homeFillsViewer: this.homeFillsViewer, - margins: this.viewportMargins, - silenceMultiImageWarnings: this.silenceMultiImageWarnings + containerSize: THIS[ this.hash ].prevContainerSize, + springStiffness: this.springStiffness, + animationTime: this.animationTime, + minZoomImageRatio: this.minZoomImageRatio, + maxZoomPixelRatio: this.maxZoomPixelRatio, + visibilityRatio: this.visibilityRatio, + wrapHorizontal: this.wrapHorizontal, + wrapVertical: this.wrapVertical, + defaultZoomLevel: this.defaultZoomLevel, + minZoomLevel: this.minZoomLevel, + maxZoomLevel: this.maxZoomLevel, + viewer: this, + degrees: this.degrees, + flipped: this.flipped, + overlayPreserveContentDirection: this.overlayPreserveContentDirection, + navigatorRotate: this.navigatorRotate, + homeFillsViewer: this.homeFillsViewer, + margins: this.viewportMargins, + silenceMultiImageWarnings: this.silenceMultiImageWarnings }); this.viewport._setContentBounds(this.world.getHomeBounds(), this.world.getContentFactor()); diff --git a/test/demo/overlay.html b/test/demo/overlay.html index bf5e3548..92140f8b 100644 --- a/test/demo/overlay.html +++ b/test/demo/overlay.html @@ -27,7 +27,7 @@ tileSources: "../data/testpattern.dzi", minZoomImageRatio: 0, maxZoomPixelRatio: 10, - overlayContentFlipped: true // change this to true to test overlay content flipping + overlayPreserveContentDirection: true // change this to true to test overlay content flipping }); viewer.addHandler("open", function(event) {