Implementing saving behavior per active viewport

This commit is contained in:
Bruno Alves de Faria committed 2018-02-02 09:14:44 -02:00
1 parent 98480d134b
commit 5dc2f8dc9c
13 files changed
+66 -15

No files matched your search

@@ -38,5 +38,8 @@ export default function ({ instance, eventData, tool, toolGroupId, toolGroup })
Collection.update(measurementId, { $set: measurement });
// Signal unsaved changes
OHIF.ui.unsavedChanges.set('viewer.studyViewer.measurements.' + eventData.toolType);
const { timepointId } = Collection.findOne(measurementData._id);
const basePath = 'viewer.studyViewer.measurements';
const timepointPath = timepointId ? `.${timepointId}` : '';
OHIF.ui.unsavedChanges.set(`${basePath}${timepointPath}.${eventData.toolType}`);
}