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
@@ -9,10 +9,10 @@ import classNames from 'classnames';
|
||||
export type CinePlayerProps = {
|
||||
className: string;
|
||||
isPlaying: boolean;
|
||||
minFrameRate: number;
|
||||
maxFrameRate: number;
|
||||
stepFrameRate: number;
|
||||
frameRate: number;
|
||||
minFrameRate?: number;
|
||||
maxFrameRate?: number;
|
||||
stepFrameRate?: number;
|
||||
frameRate?: number;
|
||||
onFrameRateChange: (value: number) => void;
|
||||
onPlayPauseChange: (value: boolean) => void;
|
||||
onClose: () => void;
|
||||
@@ -116,12 +116,12 @@ CinePlayer.defaultProps = {
|
||||
|
||||
CinePlayer.propTypes = {
|
||||
/** Minimum value for range slider */
|
||||
minFrameRate: PropTypes.number.isRequired,
|
||||
minFrameRate: PropTypes.number,
|
||||
/** Maximum value for range slider */
|
||||
maxFrameRate: PropTypes.number.isRequired,
|
||||
maxFrameRate: PropTypes.number,
|
||||
/** Increment range slider can "step" in either direction */
|
||||
stepFrameRate: PropTypes.number.isRequired,
|
||||
frameRate: PropTypes.number.isRequired,
|
||||
stepFrameRate: PropTypes.number,
|
||||
frameRate: PropTypes.number,
|
||||
/** 'true' if playing, 'false' if paused */
|
||||
isPlaying: PropTypes.bool.isRequired,
|
||||
onPlayPauseChange: PropTypes.func,
|
||||
|
||||
+2
-6
@@ -111,12 +111,8 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
it('checks if Length annotation can be added to viewport and shows up in the measurements panel', () => {
|
||||
//Click on button and verify if icon is active on toolbar
|
||||
cy.addLengthMeasurement();
|
||||
cy.get('[data-cy="measurement-tracking-prompt-begin-tracking"]').should(
|
||||
'exist'
|
||||
);
|
||||
cy.get('[data-cy="measurement-tracking-prompt-begin-tracking"]').should(
|
||||
'be.visible'
|
||||
);
|
||||
cy.get('[data-cy="viewport-notification"]').should('exist');
|
||||
cy.get('[data-cy="viewport-notification"]').should('be.visible');
|
||||
cy.get('[data-cy="prompt-begin-tracking-yes"]').click();
|
||||
|
||||
//Verify the measurement exists in the table
|
||||
|
||||
+2
-6
@@ -25,12 +25,8 @@ describe('OHIF Measurement Panel', function() {
|
||||
it('checks if measurement item can be Relabeled under Measurements panel', function() {
|
||||
// Add length measurement
|
||||
cy.addLengthMeasurement();
|
||||
cy.get('[data-cy="measurement-tracking-prompt-begin-tracking"]').should(
|
||||
'exist'
|
||||
);
|
||||
cy.get('[data-cy="measurement-tracking-prompt-begin-tracking"]').should(
|
||||
'be.visible'
|
||||
);
|
||||
cy.get('[data-cy="viewport-notification"]').should('exist');
|
||||
cy.get('[data-cy="viewport-notification"]').should('be.visible');
|
||||
cy.get('[data-cy="prompt-begin-tracking-yes"]').click();
|
||||
cy.get('[data-cy="measurement-item"]').click();
|
||||
|
||||
|
||||
Reference in new issue
Block a user