Adding cornerstoneTools init()

This commit is contained in:
Gustavo Lelis committed 2018-09-24 02:37:46 -03:00
1 parent da5b755637
commit ad459a2515
2 files changed
+10 -12

No files matched your search

@@ -268,19 +268,14 @@ const loadDisplaySetIntoViewport = (data, templateData) => {
}
// Enabling new eventDispatches form cornerstoneTools v3
cornerstoneTools.mouseInput.enable(element);
cornerstoneTools.mouseToolEventDispatcher.enable(element);
cornerstoneTools.touchInput.enable(element);
cornerstoneTools.touchToolEventDispatcher.enable(element);
cornerstoneTools.mouseWheelInput.enable(element);
cornerstoneTools.keyboardInput.enable(element);
åtoolManager.cTools.addCanvas(element);
toolManager.instantiateTools(element);
// Use the tool manager to enable the currently active tool for this
// newly rendered element
const activeTool = toolManager.getActiveTool();
toolManager.setActiveTool(activeTool, [element]);
toolManager.cTools.setToolActive(element, activeTool);
// Define a function to run whenever the Cornerstone viewport is rendered
// (e.g. following a change of window or zoom)