From 083835f8e0e5ed75811caf529d637ae8faa33c9b Mon Sep 17 00:00:00 2001 From: ivmartel Date: Thu, 10 Aug 2023 14:49:46 +0200 Subject: [PATCH] Remove orientation from layergroup --- src/app/application.js | 12 +----------- src/gui/layerGroup.js | 25 ------------------------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/src/app/application.js b/src/app/application.js index d435db8925..eacc667b01 100644 --- a/src/app/application.js +++ b/src/app/application.js @@ -790,11 +790,6 @@ export class App { } else { throw new Error('Expected one draw layer, got ' + dls.length); } - // set possible orientation - if (typeof config.orientation !== 'undefined') { - lg.setTargetOrientation( - getMatrixFromName(config.orientation)); - } } // render (will create layer) @@ -835,11 +830,6 @@ export class App { const layerGroup = this.#stage.addLayerGroup(element); // bind events this.#bindLayerGroupToApp(layerGroup); - // optional orientation - if (typeof viewConfig.orientation !== 'undefined') { - layerGroup.setTargetOrientation( - getMatrixFromName(viewConfig.orientation)); - } } /** @@ -1466,7 +1456,7 @@ export class App { const view = viewFactory.create(data.meta, data.image); const viewOrientation = getViewOrientation( imageGeometry.getOrientation(), - layerGroup.getTargetOrientation() + getMatrixFromName(dataViewConfig.orientation) ); view.setOrientation(viewOrientation); diff --git a/src/gui/layerGroup.js b/src/gui/layerGroup.js index e5787cfb22..5e55998b31 100644 --- a/src/gui/layerGroup.js +++ b/src/gui/layerGroup.js @@ -213,13 +213,6 @@ export class LayerGroup { */ #listenerHandler = new ListenerHandler(); - /** - * The target orientation matrix. - * - * @type {Matrix33} - */ - #targetOrientation; - /** * Flag to activate crosshair or not. * @@ -248,24 +241,6 @@ export class LayerGroup { this.#containerDiv = containerDiv; } - /** - * Get the target orientation. - * - * @returns {Matrix33} The orientation matrix. - */ - getTargetOrientation() { - return this.#targetOrientation; - } - - /** - * Set the target orientation. - * - * @param {Matrix33} orientation The orientation matrix. - */ - setTargetOrientation(orientation) { - this.#targetOrientation = orientation; - } - /** * Get the showCrosshair flag. *