Scale overlay tool is added into toggleLesionTrackerTools function

This commit is contained in:
Aysel Afsar 2016-01-08 13:56:50 -05:00
parent 3d4f365c8f
commit d912c7a269
5 changed files with 7 additions and 26 deletions

View File

@ -10,7 +10,8 @@ Meteor.startup(function() {
});
toolManager.addTool('scaleOverlayTool', {
mouse: cornerstoneTools.scaleOverlayTool
mouse: cornerstoneTools.scaleOverlayTool,
touch: cornerstoneTools.scaleOverlayTool
});
toolManager.addTool('deleteLesionKeyboardTool', {
@ -23,5 +24,7 @@ Meteor.startup(function() {
states.deactivate.push('nonTarget');
states.activate.push('deleteLesionKeyboardTool');
states.enable.push('scaleOverlayTool');
toolManager.setToolDefaultStates(states);
});

View File

@ -46,23 +46,8 @@ Template.viewer.onCreated(function() {
},
nonTarget: function() {
toolManager.setActiveTool("nonTarget");
},
scaleOverlayTool: function() {
// scaleOverlayToolShown property checks visibility of scale overlay tool between tabs
if(ViewerData[contentId].scaleOverlayToolShown === true) {
$('.imageViewerViewport').each(function(index, element) {
cornerstoneTools.scaleOverlayTool.disable(element);
});
ViewerData[contentId].scaleOverlayToolShown = false;
}else{
$('.imageViewerViewport').each(function(index, element) {
cornerstoneTools.scaleOverlayTool.enable(element);
});
ViewerData[contentId].scaleOverlayToolShown = true;
}
}
};
// The hotkey can also be an array (e.g. ["NUMPAD0", "0"])

View File

@ -39,13 +39,6 @@ Template.viewerMain.helpers({
iconClasses: 'fa fa-bars'
});
buttonData.push({
id: 'scaleOverlayTool',
title: 'Scale Overlay',
classes: 'imageViewerCommand',
iconClasses: 'fa fa-arrows-h'
});
buttonData.push({
id: 'length',
title: 'Length Measurement',

View File

@ -1,6 +1,6 @@
clearTools = function() {
var patientId = Session.get("patientId");
var toolTypes = ["lesion", "nonTarget", "biDirectional"];
var toolTypes = ["lesion", "nonTarget"];
var toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.toolState;
var toolStateKeys = Object.keys(toolState).slice(0);

View File

@ -18,7 +18,7 @@ toggleLesionTrackerTools = function() {
activate: ['deleteLesionKeyboardTool'],
deactivate: [],
enable: [],
disable: ['lesion', 'nonTarget']
disable: ['lesion', 'nonTarget', 'scaleOverlayTool']
};
toolManager.setToolDefaultStates(toolDefaultStates);