fix(viewportDialog): viewportDialoge not appearing in non-tracked viewports (#3071)
* fix: viewportdialoge not appearing in non-tracked viewports * feat(viewports): Introduce useViewportDialog and remove deprecated API This commit introduces the `useViewportDialog` hook and replaces the deprecated `viewportDialogApi` with the new `viewportDialogState`. Additionally, the notifications in `OHIFCornerstoneRTViewport` and `OHIFCornerstoneViewport` have been removed. Finally, the `CinePlayer` component now accepts optional parameters. * fix tests
This commit is contained in:
1 parent
c9d3c08cb6
commit
f377153b60
8 files changed
+78
-118
No files matched your search
@@ -4,8 +4,6 @@ import { useTranslation } from 'react-i18next';
|
||||
import OHIF, { utils } from '@ohif/core';
|
||||
import {
|
||||
LoadingIndicatorTotalPercent,
|
||||
Notification,
|
||||
useViewportDialog,
|
||||
useViewportGrid,
|
||||
ViewportActionBar,
|
||||
} from '@ohif/ui';
|
||||
@@ -48,7 +46,6 @@ function OHIFCornerstoneSEGViewport(props) {
|
||||
const segDisplaySet = displaySets[0];
|
||||
|
||||
const [viewportGrid, viewportGridService] = useViewportGrid();
|
||||
const [viewportDialogState, viewportDialogApi] = useViewportDialog();
|
||||
|
||||
// States
|
||||
const [isToolGroupCreated, setToolGroupCreated] = useState(false);
|
||||
@@ -366,18 +363,6 @@ function OHIFCornerstoneSEGViewport(props) {
|
||||
/>
|
||||
)}
|
||||
{getCornerstoneViewport()}
|
||||
<div className="absolute w-full">
|
||||
{viewportDialogState.viewportIndex === viewportIndex && (
|
||||
<Notification
|
||||
id="viewport-notification"
|
||||
message={viewportDialogState.message}
|
||||
type={viewportDialogState.type}
|
||||
actions={viewportDialogState.actions}
|
||||
onSubmit={viewportDialogState.onSubmit}
|
||||
onOutsideClick={viewportDialogState.onOutsideClick}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
{childrenWithProps}
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in new issue
Block a user