Test that we can access activeViewportIndex from extension
This commit is contained in:
parent
aa4e88c2fa
commit
8607659501
@ -11,6 +11,8 @@ const { studyMetadataManager } = OHIF.utils;
|
|||||||
const { setViewportSpecificData } = OHIF.redux.actions;
|
const { setViewportSpecificData } = OHIF.redux.actions;
|
||||||
|
|
||||||
const commandsModule = ({ servicesManager }) => {
|
const commandsModule = ({ servicesManager }) => {
|
||||||
|
const { ViewportGridService } = servicesManager.services;
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
getCornerstoneLibraries: () => {
|
getCornerstoneLibraries: () => {
|
||||||
return { cornerstone, cornerstoneTools };
|
return { cornerstone, cornerstoneTools };
|
||||||
@ -66,7 +68,7 @@ const commandsModule = ({ servicesManager }) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
invertViewport: () => {
|
invertViewport: () => {
|
||||||
const activeViewportIndex = 0;
|
const { activeViewportIndex } = ViewportGridService.getState();
|
||||||
const enabledElement = getEnabledElement(activeViewportIndex);
|
const enabledElement = getEnabledElement(activeViewportIndex);
|
||||||
|
|
||||||
if (enabledElement) {
|
if (enabledElement) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user