fix(tool-manager): Instantiate cornerstone tools by element
This commit is contained in:
1 parent
e947f1fad0
commit
635c8b9119
2 files changed
+4
-4
No files matched your search
@@ -173,12 +173,12 @@ export const toolManager = {
|
||||
Session.set('ToolManagerActiveToolUpdated', Random.id());
|
||||
},
|
||||
|
||||
instantiateTools() {
|
||||
// Instantiate all cornerstone tools for all enabled elements
|
||||
instantiateTools(element) {
|
||||
// Instantiate all cornerstone tools for the given element
|
||||
Object.keys(tools).forEach(toolName => {
|
||||
const apiTool = cornerstoneTools[tools[toolName]];
|
||||
if (apiTool) {
|
||||
cornerstoneTools.addTool(apiTool, {
|
||||
cornerstoneTools.addToolForElement(element, apiTool, {
|
||||
name: toolName,
|
||||
configuration: defaultToolConfig
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user