Update ViewportGridService interface
This commit is contained in:
parent
3993c12701
commit
077143bd4a
@ -2,39 +2,56 @@ const name = 'ViewportGridService';
|
|||||||
|
|
||||||
const publicAPI = {
|
const publicAPI = {
|
||||||
name,
|
name,
|
||||||
hide: _hide,
|
getState: _getState,
|
||||||
show: _show,
|
setActiveViewportIndex: _setActiveViewportIndex,
|
||||||
|
setDisplaysetForViewport: _setDisplaysetForViewport,
|
||||||
|
setLayout: _setLayout,
|
||||||
setServiceImplementation,
|
setServiceImplementation,
|
||||||
};
|
};
|
||||||
|
|
||||||
const serviceImplementation = {
|
const serviceImplementation = {
|
||||||
_hide: () => console.warn('hide() NOT IMPLEMENTED'),
|
_getState: () => console.warn('getState() NOT IMPLEMENTED'),
|
||||||
_show: () => console.warn('show() NOT IMPLEMENTED'),
|
_setActiveViewportIndex: () => console.warn('setActiveViewportIndex() NOT IMPLEMENTED'),
|
||||||
|
_setDisplaysetForViewport: () => console.warn('setDisplaysetForViewport() NOT IMPLEMENTED'),
|
||||||
|
_setLayout: () => console.warn('setLayout() NOT IMPLEMENTED'),
|
||||||
};
|
};
|
||||||
|
|
||||||
function _show({ viewportIndex, type, message, actions, onSubmit }) {
|
function _getState() {
|
||||||
return serviceImplementation._show({
|
return serviceImplementation._getState();
|
||||||
|
}
|
||||||
|
|
||||||
|
function _setActiveViewportIndex(index) {
|
||||||
|
return serviceImplementation._setActiveViewportIndex(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _setDisplaysetForViewport({ viewportIndex, displaySetInstanceUID }) {
|
||||||
|
return serviceImplementation._setDisplaysetForViewport({
|
||||||
viewportIndex,
|
viewportIndex,
|
||||||
type,
|
displaySetInstanceUID,
|
||||||
message,
|
|
||||||
actions,
|
|
||||||
onSubmit,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function _hide() {
|
function _setLayout({ numCols, numRows }) {
|
||||||
return serviceImplementation._hide();
|
return serviceImplementation._setLayout({ numCols, numRows });
|
||||||
}
|
}
|
||||||
|
|
||||||
function setServiceImplementation({
|
function setServiceImplementation({
|
||||||
hide: hideImplementation,
|
getState: getStateImplementation,
|
||||||
show: showImplementation,
|
setActiveViewportIndex: setActiveViewportIndexImplementation,
|
||||||
|
setDisplaysetForViewport: setDisplaysetForViewportImplementation,
|
||||||
|
setLayout: setLayoutImplementation,
|
||||||
}) {
|
}) {
|
||||||
if (hideImplementation) {
|
if (getStateImplementation) {
|
||||||
serviceImplementation._hide = hideImplementation;
|
serviceImplementation._getState = getStateImplementation;
|
||||||
}
|
}
|
||||||
if (showImplementation) {
|
if (setActiveViewportIndexImplementation) {
|
||||||
serviceImplementation._show = showImplementation;
|
serviceImplementation._setActiveViewportIndex = setActiveViewportIndexImplementation;
|
||||||
|
}
|
||||||
|
if (setDisplaysetForViewportImplementation) {
|
||||||
|
serviceImplementation._setDisplaysetForViewport = setDisplaysetForViewportImplementation;
|
||||||
|
}
|
||||||
|
if (setLayoutImplementation) {
|
||||||
|
serviceImplementation._setLayout = setLayoutImplementation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,11 +61,3 @@ export default {
|
|||||||
return publicAPI;
|
return publicAPI;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// initialState={{
|
|
||||||
// numRows: 1,
|
|
||||||
// numCols: 1,
|
|
||||||
// viewports: [],
|
|
||||||
// activeViewportIndex: 0,
|
|
||||||
// }}
|
|
||||||
// reducer={viewportGridReducer}
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user