LT-115: Disable/Enable CRUNEX button for active image viewer
This commit is contained in:
parent
4c02a1ea3f
commit
58d145194a
@ -32,4 +32,16 @@ pixelSpacingAutorunCheck = function() {
|
||||
// Enable Lesion Buttons
|
||||
oncologyTools.prop('disabled', false);
|
||||
}
|
||||
|
||||
// Set disabled/enabled timepoint buttons
|
||||
var imageId = enabledElement.image.imageId;
|
||||
var study = cornerstoneTools.metaData.get('study', imageId);
|
||||
|
||||
// Find the relevant timepoint given the current study
|
||||
var timepoint = Timepoints.findOne({
|
||||
studyInstanceUids: {
|
||||
$in: [study.studyInstanceUid]
|
||||
}
|
||||
});
|
||||
setTimepointTools(timepoint);
|
||||
};
|
||||
@ -3,14 +3,19 @@ setTimepointTools = function(timepoint) {
|
||||
|
||||
// Enabled tools for only follow-up tools
|
||||
var fuTools = ["button#crunexTools"];
|
||||
var fuToolsJQ = $("button#crunexTools");
|
||||
var isDisabled = false;
|
||||
if ((timepoint.timepointType).toLowerCase() === "baseline") {
|
||||
// Set active tool as lesion tool
|
||||
toolManager.setActiveTool('bidirectional');
|
||||
toolManager.addDisabledTool({tools: fuTools, status: true});
|
||||
isDisabled = true;
|
||||
} else {
|
||||
toolManager.setActiveTool(toolManager.getDefaultTool());
|
||||
toolManager.addDisabledTool({tools: fuTools, status: false});
|
||||
isDisabled = false;
|
||||
}
|
||||
|
||||
toolManager.addDisabledTool({tools: fuTools, status: isDisabled});
|
||||
fuToolsJQ.prop('disabled', isDisabled);
|
||||
};
|
||||
|
||||
timepointAutoCheck = function(templateData) {
|
||||
|
||||
@ -158,7 +158,7 @@ Template.toolbar.onRendered(function() {
|
||||
var extraTooltipButtons = $('[rel="tooltip"]');
|
||||
extraTooltipButtons.tooltip(OHIF.viewer.tooltipConfig);
|
||||
|
||||
// Set disabled/enabled tool buttons
|
||||
// Set disabled/enabled tool buttons that are set in toolManager
|
||||
setButtonsDisability();
|
||||
});
|
||||
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
#toolbarGroupButton
|
||||
button
|
||||
&.active, &:active
|
||||
background-color: #3B678E
|
||||
|
||||
.dropdown-menu
|
||||
background-color: black
|
||||
border: solid 1px #333
|
||||
|
||||
Loading…
Reference in New Issue
Block a user