Test that we can access activeViewportIndex from extension
This commit is contained in:
1 parent
aa4e88c2fa
commit
8607659501
1 file changed
+3
-1
@@ -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) {
|
||||||
|
|||||||
Reference in new issue
Block a user