Fix keyscroll.
This commit is contained in:
parent
edfbad10af
commit
5019f539ee
@ -1,15 +1,18 @@
|
|||||||
import { viewportUtils } from './viewportUtils';
|
import { viewportUtils } from './viewportUtils';
|
||||||
|
import { cornerstoneTools } from 'meteor/ohif:cornerstone';
|
||||||
|
|
||||||
|
const scroll = cornerstoneTools.import('util/scroll');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function switches to an image given an element and
|
* This function switches to an image given an element and
|
||||||
* the relative distance from the current image in the stack
|
* the relative distance from the current image in the stack
|
||||||
*
|
*
|
||||||
* e.g. switchToImageRelative(element, -1) to switch to currentImageIdIndex - 1
|
* e.g. switchToImageRelative(element, -1) to switch to currentImageIdIndex - 1
|
||||||
*
|
*
|
||||||
* @param element
|
* @param element
|
||||||
* @param {number} [distanceFromCurrentIndex] The image index in the stack to switch to.
|
* @param {number} [distanceFromCurrentIndex] The image index in the stack to switch to.
|
||||||
*/
|
*/
|
||||||
export function switchToImageRelative(distanceFromCurrentIndex) {
|
export function switchToImageRelative(distanceFromCurrentIndex) {
|
||||||
var element = viewportUtils.getActiveViewportElement();
|
var element = viewportUtils.getActiveViewportElement();
|
||||||
cornerstoneTools.scroll(element, distanceFromCurrentIndex);
|
scroll(element, distanceFromCurrentIndex);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user