@cornerstonejs/tools 4.0.0 → 4.0.1

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.
@@ -1,3 +1,3 @@
1
1
  import type Synchronizer from './Synchronizer';
2
- declare function getSynchronizer(synchronizerId: string): Synchronizer | void;
2
+ declare function getSynchronizer(synchronizerId: string): Synchronizer | undefined;
3
3
  export default getSynchronizer;
@@ -1,4 +1,4 @@
1
- import type { Types } from '@cornerstonejs/core';
1
+ import { type Types } from '@cornerstonejs/core';
2
2
  import { BaseTool } from './base';
3
3
  import type { EventTypes, PublicToolProps, ToolProps } from '../types';
4
4
  declare class ZoomTool extends BaseTool {
@@ -1,5 +1,6 @@
1
1
  import { vec3 } from 'gl-matrix';
2
2
  import vtkMath from '@kitware/vtk.js/Common/Core/Math';
3
+ import { getConfiguration } from '@cornerstonejs/core';
3
4
  import { Enums, getEnabledElement } from '@cornerstonejs/core';
4
5
  import { BaseTool } from './base';
5
6
  import { Events } from '../enums';
@@ -61,9 +62,13 @@ class ZoomTool extends BaseTool {
61
62
  const imageWidth = dimensions[0] * spacing[0];
62
63
  const imageHeight = dimensions[1] * spacing[1];
63
64
  const canvasAspect = size[0] / size[1];
65
+ const insetImageMultiplier = getConfiguration().rendering
66
+ ?.useLegacyCameraFOV
67
+ ? 1.1
68
+ : 1;
64
69
  const displayArea = viewport.options?.displayArea;
65
- const imageAreaScaleX = displayArea?.imageArea?.[0] ?? 1.1;
66
- const imageAreaScaleY = displayArea?.imageArea?.[1] ?? 1.1;
70
+ const imageAreaScaleX = displayArea?.imageArea?.[0] ?? insetImageMultiplier;
71
+ const imageAreaScaleY = displayArea?.imageArea?.[1] ?? insetImageMultiplier;
67
72
  const scaledImageWidth = imageWidth * imageAreaScaleX;
68
73
  const scaledImageHeight = imageHeight * imageAreaScaleY;
69
74
  const scaledImageAspect = scaledImageWidth / scaledImageHeight;
@@ -1 +1 @@
1
- export declare const version = "4.0.0";
1
+ export declare const version = "4.0.1";
@@ -1 +1 @@
1
- export const version = '4.0.0';
1
+ export const version = '4.0.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "module": "./dist/esm/index.js",
@@ -108,7 +108,7 @@
108
108
  "canvas": "^3.1.0"
109
109
  },
110
110
  "peerDependencies": {
111
- "@cornerstonejs/core": "^4.0.0",
111
+ "@cornerstonejs/core": "^4.0.1",
112
112
  "@kitware/vtk.js": "32.12.1",
113
113
  "@types/d3-array": "^3.0.4",
114
114
  "@types/d3-interpolate": "^3.0.1",
@@ -127,5 +127,5 @@
127
127
  "type": "individual",
128
128
  "url": "https://ohif.org/donate"
129
129
  },
130
- "gitHead": "0f87be152df0106b75908c1a9e929e5c68a149bd"
130
+ "gitHead": "b1979f6092bd59358ba840a4ba4356ef915b8073"
131
131
  }