Integrate Cornerstone Tools v3 (#235) - WIP

- fix(stack-scroll): Activate mouse wheel and scrollbar stack scroll
- fix(touch): Activate pinch zoom, two-finger pan and three (or more) finger stack scroll
This commit is contained in:
Evren Ozkan committed 2018-11-09 13:24:48 -05:00
1 parent 4cf68adec7
commit 8b6f17c103
4 files changed
+41 -23

No files matched your search

@@ -277,8 +277,8 @@ const loadDisplaySetIntoViewport = (data, templateData) => {
cornerstoneTools.playClip(element);
}
// InstantiateTools on the new element.
toolManager.instantiateTools(element);
// Instantiate the tools
toolManager.instantiateTools();
// Use the tool manager to enable the currently active tool for this
// newly rendered element
@@ -656,17 +656,13 @@ Template.imageViewerViewport.onDestroyed(function() {
return;
}
// Disable mouse functions
cornerstoneTools.mouseInput.disable(element);
cornerstoneTools.touchInput.disable(element);
cornerstoneTools.mouseWheelInput.disable(element);
// Remove all tools for the destroyed element
toolManager.removeToolsForElement(element);
OHIF.viewer.updateImageSynchronizer.remove(element);
// Clear the stack prefetch data
let stackPrefetchData = cornerstoneTools.getToolState(element, 'stackPrefetch');
stackPrefetchData = [];
cornerstoneTools.stackPrefetch.disable(element);
cornerstoneTools.clearToolState(element, 'stackPrefetch');
// Try to stop any currently playing clips
// Otherwise the interval will continuously throw errors