Switch toolState usage since ES6 modules are read-only

This commit is contained in:
Erik Ziegler committed 2017-06-15 09:18:54 +02:00
1 parent ddef3c4710
commit 27296a8bca
12 files changed
+308 -309

No files matched your search

@@ -4,7 +4,7 @@ import { OHIF } from 'meteor/ohif:core';
OHIF.measurements.syncMeasurementAndToolData = measurement => {
OHIF.log.info('syncMeasurementAndToolData');
const toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.toolState;
const toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.saveToolState();
const imageId = measurement.imageId;
const toolType = measurement.toolType;
@@ -55,4 +55,6 @@ OHIF.measurements.syncMeasurementAndToolData = measurement => {
// Add the MeasurementData into the toolData for this imageId
toolState[imageId][toolType].data.push(measurement);
cornerstoneTools.globalImageIdSpecificToolStateManager.restoreToolState(toolState);
};