LT-305: Small fixes related to find/replace and target measurement functions being pulled from old code. Temporarily removed CR/UN/EX tools
This commit is contained in:
1 parent
16f7b39b44
commit
adb8e76aef
8 files changed
+43
-256
No files matched your search
@@ -111,10 +111,11 @@ Template.toolbarSection.helpers({
|
||||
|
||||
extraToolbarButtons() {
|
||||
// Check if the measure tools shall be disabled
|
||||
const isToolDisabled = false; //!Template.instance().data.timepointApi.currentTimepointId;
|
||||
const isToolDisabled = !Template.instance().data.timepointApi.currentTimepointId;
|
||||
const buttonData = [];
|
||||
|
||||
// TODO: Get real icons for CR / UN / EX
|
||||
/* Disabling these for now, since they aren't hooked up in the Lesion Tracker yet
|
||||
buttonData.push({
|
||||
id: 'crTool',
|
||||
title: 'CR Tool',
|
||||
@@ -137,7 +138,7 @@ Template.toolbarSection.helpers({
|
||||
classes: 'imageViewerTool toolbarSectionButton',
|
||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-temp',
|
||||
disabled: isToolDisabled
|
||||
});
|
||||
});*/
|
||||
|
||||
return buttonData;
|
||||
}
|
||||
|
||||
@@ -124,32 +124,5 @@ Template.viewer.events({
|
||||
},
|
||||
'CornerstoneToolsMeasurementRemoved .imageViewerViewport'(event, instance, eventData) {
|
||||
OHIF.measurements.MeasurementHandlers.onRemoved(event, instance, eventData);
|
||||
},
|
||||
CornerstoneToolsMouseClick(event, instance, data) {
|
||||
const element = event.target;
|
||||
|
||||
const toolState = cornerstoneTools.getToolState(element, 'bidirectional');
|
||||
|
||||
// Stop here if no tool state was found
|
||||
if (!toolState) {
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
for (let i = 0; i < toolState.data.length; i++) {
|
||||
const toolData = toolState.data[i];
|
||||
if (toolData.active) {
|
||||
OHIF.measurements.toggleLabelButton({
|
||||
instance,
|
||||
measurementId: toolData._id,
|
||||
toolType: toolData.toolType,
|
||||
element,
|
||||
measurementApi: instance.data.measurementApi,
|
||||
position: data.currentPoints.page
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user