Skip to content

Commit

Permalink
Remove orientation from layergroup
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Aug 10, 2023
1 parent 4b697d3 commit 083835f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
12 changes: 1 addition & 11 deletions src/app/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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));
}
}

/**
Expand Down Expand Up @@ -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);

Expand Down
25 changes: 0 additions & 25 deletions src/gui/layerGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,6 @@ export class LayerGroup {
*/
#listenerHandler = new ListenerHandler();

/**
* The target orientation matrix.
*
* @type {Matrix33}
*/
#targetOrientation;

/**
* Flag to activate crosshair or not.
*
Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit 083835f

Please sign in to comment.