reorganize packages, start converting overall app to react (very broken at the moment)

This commit is contained in:
Erik Ziegler committed 2018-12-12 18:06:25 +01:00
1 parent 024fe1a448
commit 5f30f7bd35
479 files changed
+5364 -11611

No files matched your search

@@ -0,0 +1,27 @@
import _ from 'underscore';
import { OHIF } from 'meteor/ohif:core';
/**
* Return the tool configuration of a given tool type
*
* @param {String} toolType The tool type of the desired configuration
*/
OHIF.measurements.getToolConfiguration = toolType => {
const { MeasurementApi } = OHIF.measurements;
const configuration = MeasurementApi.getConfiguration();
const toolsGroupsMap = MeasurementApi.getToolsGroupsMap();
const toolGroupId = toolsGroupsMap[toolType];
const toolGroup = _.findWhere(configuration.measurementTools, { id: toolGroupId });
let tool;
if (toolGroup) {
tool = _.findWhere(toolGroup.childTools, { id: toolType });
}
return {
toolGroupId,
toolGroup,
tool
};
};