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
+2
-2
@@ -282,8 +282,7 @@ const loadDisplaySetIntoViewport = (data, templateData) => {
|
||||
|
||||
// Use the tool manager to enable the currently active tool for this
|
||||
// newly rendered element
|
||||
const activeTool = toolManager.getActiveTool();
|
||||
toolManager.setActiveTool(activeTool);
|
||||
toolManager.setActiveTool();
|
||||
|
||||
// Define a function to run whenever the Cornerstone viewport is rendered
|
||||
// (e.g. following a change of window or zoom)
|
||||
@@ -463,6 +462,7 @@ const loadDisplaySetIntoViewport = (data, templateData) => {
|
||||
// that is used for its synchronized viewport updating.
|
||||
// This is necessary if this new image shares a frame of reference
|
||||
// with currently displayed images
|
||||
const activeTool = toolManager.getActiveTool();
|
||||
if (activeTool === 'crosshairs') {
|
||||
updateCrosshairsSynchronizer(imagePlane.frameOfReferenceUID);
|
||||
}
|
||||
|
||||
+2
-2
@@ -50,10 +50,10 @@ Template.textMarkerDialogs.events({
|
||||
cornerstone.updateImage(element);
|
||||
},
|
||||
'click .closeTextMarkerDialogs'() {
|
||||
const defaultTool = toolManager.getDefaultTool();
|
||||
toolManager.setActiveTool(defaultTool);
|
||||
toolManager.setActiveTool();
|
||||
document.getElementById('textMarkerOptionsDialog').close();
|
||||
$('#spine').removeClass('active');
|
||||
const defaultTool = toolManager.getDefaultTool();
|
||||
$('#' + defaultTool).addClass('active');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user