@cornerstonejs/tools 2.2.3 → 2.2.5
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.
|
@@ -157,12 +157,14 @@ function _stopClip(element, options = { stopDynamicCine: true, viewportId: undef
|
|
|
157
157
|
}
|
|
158
158
|
function _stopDynamicVolumeCine(element) {
|
|
159
159
|
const { viewport } = getEnabledElement(element);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
if (viewport instanceof VolumeViewport) {
|
|
161
|
+
const volume = _getVolumeFromViewport(viewport);
|
|
162
|
+
if (volume?.isDynamicVolume()) {
|
|
163
|
+
const dynamicCineElement = dynamicVolumesPlayingMap.get(volume.volumeId);
|
|
164
|
+
dynamicVolumesPlayingMap.delete(volume.volumeId);
|
|
165
|
+
if (dynamicCineElement && dynamicCineElement !== element) {
|
|
166
|
+
stopClip(dynamicCineElement);
|
|
167
|
+
}
|
|
166
168
|
}
|
|
167
169
|
}
|
|
168
170
|
}
|
|
@@ -212,6 +214,9 @@ function _stopClipWithData(playClipData) {
|
|
|
212
214
|
}
|
|
213
215
|
}
|
|
214
216
|
function _getVolumeFromViewport(viewport) {
|
|
217
|
+
if (!(viewport instanceof VolumeViewport)) {
|
|
218
|
+
return undefined;
|
|
219
|
+
}
|
|
215
220
|
const volumeIds = viewport.getAllVolumeIds();
|
|
216
221
|
if (!volumeIds?.length) {
|
|
217
222
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"types": "./dist/esm/index.d.ts",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"canvas": "^2.11.2"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
|
-
"@cornerstonejs/core": "^2.2.
|
|
107
|
+
"@cornerstonejs/core": "^2.2.5",
|
|
108
108
|
"@kitware/vtk.js": "32.1.0",
|
|
109
109
|
"@types/d3-array": "^3.0.4",
|
|
110
110
|
"@types/d3-interpolate": "^3.0.1",
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"type": "individual",
|
|
124
124
|
"url": "https://ohif.org/donate"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "aecd93afbc6455eddd92d471a703003cf0c12c59"
|
|
127
127
|
}
|