Adding separate save buttons for measurements

This commit is contained in:
Bruno Alves de Faria committed 2018-02-02 09:14:44 -02:00
1 parent 5dc2f8dc9c
commit 7da787c3f8
16 files changed
+72 -114

No files matched your search

@@ -0,0 +1,15 @@
import { OHIF } from 'meteor/ohif:core';
/**
* Extensible method to trigger unsaved changes on the active timepoint
*
* @param {String} subpath - The unsaved changes subpath that will come after the timepoint ID
*/
OHIF.measurements.triggerTimepointUnsavedChanges = (subpath='changed') => {
const basePath = 'viewer.studyViewer.measurements';
const activeTimepoint = OHIF.measurements.getActiveTimepoint();
if (!activeTimepoint) return;
const { timepointId } = activeTimepoint;
const timepointPath = timepointId ? `.${timepointId}` : '';
OHIF.ui.unsavedChanges.set(`${basePath}${timepointPath}.${subpath}`);
};