Adding cornerstoneTools init()

This commit is contained in:
Gustavo Lelis authored and Evren Ozkan committed 2018-11-09 13:23:43 -05:00
1 parent e5e027f716
commit fee6b240a4
2 files changed
+10 -12

No files matched your search

@@ -278,19 +278,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)