forked from OHIF/Viewers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Set SR viewport as active by interaction (OHIF#1118)
* fix: Set SR viewport as active by interaction * quick fix * (eslint) add "before" as global variables * add data-cy * add data-cy * create E2E test * (E2E) create custom command to set layout size * remove .only e2e * remove throttle for onScroll
- Loading branch information
Showing
6 changed files
with
112 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
}, | ||
"globals": { | ||
"cy": true, | ||
"before": true, | ||
"context": true, | ||
"Cypress": true, | ||
"assert": true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import OHIF from '@ohif/core'; | ||
import { connect } from 'react-redux'; | ||
import DicomHtmlViewport from './DicomHtmlViewport'; | ||
|
||
const { setViewportActive } = OHIF.redux.actions; | ||
|
||
const mapStateToProps = (state, ownProps) => { | ||
const { viewportIndex, byteArray } = ownProps; | ||
const activeViewportIndex = state.viewports; | ||
|
||
return { | ||
viewportIndex, | ||
activeViewportIndex, | ||
byteArray, | ||
}; | ||
}; | ||
|
||
const mapDispatchToProps = (dispatch, ownProps) => { | ||
const { viewportIndex } = ownProps; | ||
|
||
return { | ||
setViewportActive: () => { | ||
dispatch(setViewportActive(viewportIndex)); | ||
}, | ||
}; | ||
}; | ||
|
||
const ConnectedDicomHtmlViewport = connect( | ||
mapStateToProps, | ||
mapDispatchToProps | ||
)(DicomHtmlViewport); | ||
|
||
export default ConnectedDicomHtmlViewport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters