Switch toolState usage since ES6 modules are read-only
This commit is contained in:
1 parent
ddef3c4710
commit
27296a8bca
12 files changed
+308
-309
No files matched your search
@@ -2,7 +2,7 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
const removeToolDataWithMeasurementId = (imageId, toolType, measurementId) => {
|
||||
OHIF.log.info('removeToolDataWithMeasurementId');
|
||||
const toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.toolState;
|
||||
const toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.saveToolState();
|
||||
|
||||
// Find any related toolData
|
||||
if (!toolState[imageId] || !toolState[imageId][toolType]) {
|
||||
@@ -32,6 +32,8 @@ const removeToolDataWithMeasurementId = (imageId, toolType, measurementId) => {
|
||||
toRemove.forEach(function(index) {
|
||||
toolData.splice(index, 1);
|
||||
});
|
||||
|
||||
cornerstoneTools.globalImageIdSpecificToolStateManager.restoreToolState(toolState);
|
||||
};
|
||||
|
||||
OHIF.lesiontracker.clearMeasurementTimepointData = (measurementId, timepointId) => {
|
||||
|
||||
Reference in new issue
Block a user