diff --git a/extensions/vtk/src/OHIFVTKViewport.js b/extensions/vtk/src/OHIFVTKViewport.js index 8dccda2f3..bac284a4e 100644 --- a/extensions/vtk/src/OHIFVTKViewport.js +++ b/extensions/vtk/src/OHIFVTKViewport.js @@ -363,7 +363,7 @@ class OHIFVTKViewport extends Component { const { UINotificationService } = this.props.servicesManager.services; if (this.props.viewportIndex === 0) { const message = error.message.includes('buffer') - ? 'Buffer allocation limit exceeded' + ? 'Dataset is too big to display in MPR' : error.message; console.error(errorTitle, error); UINotificationService.show({ @@ -371,15 +371,14 @@ class OHIFVTKViewport extends Component { message, type: 'error', autoClose: false, - /* action: { - label: 'Download', - onClick: () => { - const listOfUIDs = [window.location.href.split('/').pop()]; - this.props.commandsManager.runCommand('downloadAndZip', { - listOfUIDs, - }); + action: { + label: 'Exit 2D MPR', + onClick: ({ close }) => { + // context: 'ACTIVE_VIEWPORT::VTK', + close(); + this.props.commandsManager.runCommand('setCornerstoneLayout'); }, - }, */ + }, }); } this.setState({ isLoaded: true }); diff --git a/platform/ui/src/components/snackbar/SnackbarItem.js b/platform/ui/src/components/snackbar/SnackbarItem.js index f3d7243eb..2e1d62ccf 100644 --- a/platform/ui/src/components/snackbar/SnackbarItem.js +++ b/platform/ui/src/components/snackbar/SnackbarItem.js @@ -5,6 +5,10 @@ const SnackbarItem = ({ options, onClose }) => { onClose(options.id); }; + const handleClick = () => { + options.action.onClick({ ...options, close: handleClose }); + }; + useEffect(() => { if (options.autoClose) { setTimeout(() => { @@ -25,7 +29,7 @@ const SnackbarItem = ({ options, onClose }) => { {options.title &&