Integrate Cornerstone Tools v3 (#235) - WIP
fix(mouse-buttons): Support for assigning tools to mouse buttons (left, right, middle) fix(tool-naming): Fix tool naming issues
This commit is contained in:
1 parent
6fedea1653
commit
4cf68adec7
9 files changed
+170
-121
No files matched your search
@@ -303,20 +303,20 @@ Template.toolbarSection.onRendered(function() {
|
||||
OHIF.viewerbase.viewportUtils.toggleCineDialog();
|
||||
}
|
||||
|
||||
// Set disabled/enabled tool buttons that are set in toolManager
|
||||
|
||||
const states = OHIF.viewerbase.toolManager.getToolDefaultStates();
|
||||
const disabledToolButtons = states.disabledToolButtons;
|
||||
const allToolbarButtons = $('#toolbar').find('button');
|
||||
if (disabledToolButtons && disabledToolButtons.length > 0) {
|
||||
for (let i = 0; i < allToolbarButtons.length; i++) {
|
||||
const toolbarButton = allToolbarButtons[i];
|
||||
$(toolbarButton).prop('disabled', false);
|
||||
|
||||
const index = disabledToolButtons.indexOf($(toolbarButton).attr('id'));
|
||||
if (index !== -1) {
|
||||
$(toolbarButton).prop('disabled', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO: Figure out a way to disable/enable the buttons with each status from New API
|
||||
// // Set disabled/enabled tool buttons that are set in toolManager
|
||||
// const states = OHIF.viewerbase.toolManager.getToolDefaultStates();
|
||||
// const disabledToolButtons = states.disabledToolButtons;
|
||||
// const allToolbarButtons = $('#toolbar').find('button');
|
||||
// if (disabledToolButtons && disabledToolButtons.length > 0) {
|
||||
// for (let i = 0; i < allToolbarButtons.length; i++) {
|
||||
// const toolbarButton = allToolbarButtons[i];
|
||||
// $(toolbarButton).prop('disabled', false);
|
||||
//
|
||||
// const index = disabledToolButtons.indexOf($(toolbarButton).attr('id'));
|
||||
// if (index !== -1) {
|
||||
// $(toolbarButton).prop('disabled', true);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
});
|
||||
@@ -48,7 +48,12 @@ Meteor.startup(() => {
|
||||
Session.setDefault('leftSidebar', false);
|
||||
Session.setDefault('rightSidebar', false);
|
||||
|
||||
OHIF.viewer.defaultTool = 'wwwc';
|
||||
OHIF.viewer.defaultTool = {
|
||||
left: 'wwwc',
|
||||
right: 'zoom',
|
||||
middle: 'pan'
|
||||
};
|
||||
|
||||
OHIF.viewer.refLinesEnabled = true;
|
||||
OHIF.viewer.cine = {
|
||||
framesPerSecond: 24,
|
||||
|
||||
Reference in new issue
Block a user