Improving "Add/Edit Description" workflow
This commit is contained in:
1 parent
d486ebd551
commit
3bd44fd7bc
12 files changed
+69
-19
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
/**
|
||||
* Return the parent tool data if it's a child tool or the tool data itself if not
|
||||
*
|
||||
* @param measurementData measurement data that must contain the toolType and measurement's _id
|
||||
* @returns {Object} Parent measurement data
|
||||
*/
|
||||
OHIF.measurements.getParentToolData = measurementData => {
|
||||
const { toolType, _id } = measurementData;
|
||||
const { tool } = OHIF.measurements.getToolConfiguration(toolType);
|
||||
const parentToolType = tool.parentTool || toolType;
|
||||
const parentToolData = OHIF.viewer.measurementApi.tools[parentToolType].findOne(_id);
|
||||
return parentToolData;
|
||||
};
|
||||
Reference in new issue
Block a user