@cornerstonejs/tools 4.22.1 → 4.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -902,6 +902,7 @@ class AdvancedMagnifyViewport {
902
902
  _syncViewportsCameras(sourceViewport, magnifyViewport) {
903
903
  const worldPos = sourceViewport.canvasToWorld(this.position);
904
904
  const parallelScale = this._convertZoomFactorToParallelScale(sourceViewport, magnifyViewport, this.zoomFactor);
905
+ const { flipHorizontal, flipVertical } = sourceViewport.getCamera();
905
906
  const { focalPoint, position, viewPlaneNormal } = magnifyViewport.getCamera();
906
907
  const distance = Math.sqrt(Math.pow(focalPoint[0] - position[0], 2) +
907
908
  Math.pow(focalPoint[1] - position[1], 2) +
@@ -920,6 +921,8 @@ class AdvancedMagnifyViewport {
920
921
  parallelScale,
921
922
  focalPoint: updatedFocalPoint,
922
923
  position: updatedPosition,
924
+ flipHorizontal,
925
+ flipVertical,
923
926
  });
924
927
  }
925
928
  _syncStackViewports(sourceViewport, magnifyViewport) {
@@ -52,7 +52,7 @@ class MagnifyTool extends BaseTool {
52
52
  const { viewport } = enabledElement;
53
53
  const { element } = viewport;
54
54
  const viewportProperties = viewport.getProperties();
55
- const { rotation: originalViewportRotation } = viewport.getViewPresentation();
55
+ const { rotation: originalViewportRotation, flipHorizontal: originalViewportFlipHorizontal, flipVertical: originalViewportFlipVertical, } = viewport.getViewPresentation();
56
56
  const { canvas: canvasPos, world: worldPos } = currentPoints;
57
57
  let magnifyToolElement;
58
58
  magnifyToolElement = element.querySelector('.magnifyTool');
@@ -83,6 +83,8 @@ class MagnifyTool extends BaseTool {
83
83
  magnifyViewport.setProperties(viewportProperties);
84
84
  magnifyViewport.setViewPresentation({
85
85
  rotation: originalViewportRotation,
86
+ flipHorizontal: originalViewportFlipHorizontal,
87
+ flipVertical: originalViewportFlipVertical,
86
88
  });
87
89
  const { parallelScale } = viewport.getCamera();
88
90
  const { focalPoint, position, viewPlaneNormal } = magnifyViewport.getCamera();
@@ -1 +1 @@
1
- export declare const version = "4.22.1";
1
+ export declare const version = "4.22.2";
@@ -1 +1 @@
1
- export const version = '4.22.1';
1
+ export const version = '4.22.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "4.22.1",
3
+ "version": "4.22.2",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "module": "./dist/esm/index.js",
@@ -105,11 +105,11 @@
105
105
  "lodash.get": "4.4.2"
106
106
  },
107
107
  "devDependencies": {
108
- "@cornerstonejs/core": "4.22.1",
108
+ "@cornerstonejs/core": "4.22.2",
109
109
  "canvas": "3.2.0"
110
110
  },
111
111
  "peerDependencies": {
112
- "@cornerstonejs/core": "4.22.1",
112
+ "@cornerstonejs/core": "4.22.2",
113
113
  "@kitware/vtk.js": "34.15.1",
114
114
  "@types/d3-array": "3.2.1",
115
115
  "@types/d3-interpolate": "3.0.4",
@@ -128,5 +128,5 @@
128
128
  "type": "individual",
129
129
  "url": "https://ohif.org/donate"
130
130
  },
131
- "gitHead": "865747e4685ad223351f43c162f752bc03e4fb18"
131
+ "gitHead": "5a64ff28c61a49319bea18fed347b216c7eba126"
132
132
  }