LT-296: Clicking on measurement data in table activates the measurement
This commit is contained in:
1 parent
42c938fb44
commit
80337f271e
19 files changed
+288
-307
No files matched your search
@@ -3,17 +3,22 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
/**
|
||||
* Sets all tool data entries value for 'active' to false
|
||||
* This is used to remove the active color on entire sets of tools
|
||||
*
|
||||
* @param element The Cornerstone element that is being used
|
||||
* @param toolType The tooltype of the tools that will be deactivated
|
||||
*/
|
||||
OHIF.measurements.deactivateAllToolData = (element, toolType) => {
|
||||
const toolData = cornerstoneTools.getToolState(element, toolType);
|
||||
if (!toolData) {
|
||||
return;
|
||||
}
|
||||
OHIF.measurements.deactivateAllToolData = () => {
|
||||
const toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.toolState;
|
||||
|
||||
for (let i = 0; i < toolData.data.length; i++) {
|
||||
toolData.data[i].active = false;
|
||||
}
|
||||
Object.keys(toolState).forEach(imageId => {
|
||||
const toolData = toolState[imageId];
|
||||
|
||||
Object.keys(toolData).forEach(toolType => {
|
||||
const specificToolData = toolData[toolType];
|
||||
if (!specificToolData || !specificToolData.data || !specificToolData.data.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
specificToolData.data.forEach(data => {
|
||||
data.active = false;
|
||||
});
|
||||
});
|
||||
})
|
||||
};
|
||||
Reference in new issue
Block a user