@cornerstonejs/core 2.7.2 → 2.7.3

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.
@@ -599,6 +599,10 @@ class Viewport {
599
599
  }
600
600
  getVtkActiveCamera() {
601
601
  const renderer = this.getRenderer();
602
+ if (!renderer) {
603
+ console.warn('No renderer found for the viewport');
604
+ return null;
605
+ }
602
606
  return renderer.getActiveCamera();
603
607
  }
604
608
  getCameraNoRotation() {
@@ -157,6 +157,10 @@ class VolumeViewport extends BaseVolumeViewport {
157
157
  }
158
158
  setCameraClippingRange() {
159
159
  const activeCamera = this.getVtkActiveCamera();
160
+ if (!activeCamera) {
161
+ console.warn('No active camera found');
162
+ return;
163
+ }
160
164
  if (activeCamera.getParallelProjection()) {
161
165
  activeCamera.setClippingRange(-RENDERING_DEFAULTS.MAXIMUM_RAY_DISTANCE, RENDERING_DEFAULTS.MAXIMUM_RAY_DISTANCE);
162
166
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -82,5 +82,5 @@
82
82
  "type": "individual",
83
83
  "url": "https://ohif.org/donate"
84
84
  },
85
- "gitHead": "010ff3c4a19f8b20d288768c2c95231dcc7c5ed0"
85
+ "gitHead": "b93d749cd3d670af26430c9ef00413dcb1103559"
86
86
  }