Added hotkey support to viewerbase
This commit is contained in:
1 parent
a005e5b359
commit
da3101be93
59 files changed
+1002
-71
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* This function switches to an image given an element and the index of the image in the current stack
|
||||
* Note: Negative indexing is supported:
|
||||
*
|
||||
* e.g. switchToImageByIndex(element, -1) to switch to the last image of the stack
|
||||
*
|
||||
* @param element
|
||||
* @param {number} [newImageIdIndex] The image index in the stack to switch to.
|
||||
*/
|
||||
switchToImageByIndex = function(newImageIdIndex) {
|
||||
var element = getActiveViewportElement();
|
||||
cornerstoneTools.scrollToIndex(element, newImageIdIndex);
|
||||
};
|
||||
Reference in new issue
Block a user