@cornerstonejs/tools 1.70.13 → 1.70.14

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "1.70.13",
3
+ "version": "1.70.14",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "main": "src/index.ts",
6
6
  "types": "dist/types/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
30
30
  },
31
31
  "dependencies": {
32
- "@cornerstonejs/core": "^1.70.13",
32
+ "@cornerstonejs/core": "^1.70.14",
33
33
  "@icr/polyseg-wasm": "0.4.0",
34
34
  "@types/offscreencanvas": "2019.7.3",
35
35
  "comlink": "^4.4.1",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@icr/polyseg-wasm": "0.4.0",
44
- "@kitware/vtk.js": "30.3.3",
44
+ "@kitware/vtk.js": "30.4.1",
45
45
  "@types/d3-array": "^3.0.4",
46
46
  "@types/d3-interpolate": "^3.0.1",
47
47
  "d3-array": "^3.2.3",
@@ -59,5 +59,5 @@
59
59
  "type": "individual",
60
60
  "url": "https://ohif.org/donate"
61
61
  },
62
- "gitHead": "cab8855c6d09eb5f1175eaf1259dd430812ad55a"
62
+ "gitHead": "e511c3f4b11596cfedb30b071b42c9c68d71d018"
63
63
  }
@@ -79,7 +79,12 @@ class TrackballRotateTool extends BaseTool {
79
79
  const { viewport } = getEnabledElementByIds(
80
80
  viewportId,
81
81
  renderingEngineId
82
- );
82
+ ) || { viewport: null };
83
+
84
+ if (!viewport) {
85
+ return;
86
+ }
87
+
83
88
  const { element } = viewport;
84
89
 
85
90
  const resizeObserver = new ResizeObserver(() => {
@@ -160,21 +160,24 @@ class ViewportColorbar extends Colorbar {
160
160
  private _viewportVOIModifiedCallback = (
161
161
  evt: Types.EventTypes.VoiModifiedEvent
162
162
  ) => {
163
- const { viewportId, volumeId, range: voiRange } = evt.detail;
163
+ const { viewportId, volumeId, range: voiRange, colormap } = evt.detail;
164
164
  const { viewport } = this.enabledElement;
165
-
166
165
  if (viewportId !== viewport.id || volumeId !== this._volumeId) {
167
166
  return;
168
167
  }
169
168
 
170
169
  this.voiRange = voiRange;
170
+
171
+ if (colormap) {
172
+ this.activeColormapName = colormap.name;
173
+ }
171
174
  this.showAndAutoHideTicks();
172
175
  };
173
176
 
174
177
  private _viewportColormapModifiedCallback = (
175
178
  evt: Types.EventTypes.ColormapModifiedEvent
176
179
  ) => {
177
- const { viewportId, colormap, volumeId } = evt.detail;
180
+ const { viewportId, colormap, volumeId } = evt.detail;
178
181
  const { viewport } = this.enabledElement;
179
182
 
180
183
  if (viewportId !== viewport.id || volumeId !== this._volumeId) {