Try capturing and setting the dom reference in our viewports module
This commit is contained in:
parent
1ff173b3e8
commit
d430596025
@ -50,6 +50,21 @@ const mapDispatchToProps = (dispatch, ownProps) => {
|
||||
dispatch(clearViewportSpecificData(viewportIndex));
|
||||
},
|
||||
|
||||
/**
|
||||
* Our component "enables" the underlying dom element on "componentDidMount"
|
||||
* It listens for that event, and then emits the enabledElement. We can grab
|
||||
* a reference to it here, to make playing with cornerstone's native methods
|
||||
* easier.
|
||||
*/
|
||||
onElementEnabled: event => {
|
||||
const enabledElement = event.detail;
|
||||
dispatch(
|
||||
setViewportSpecificData(viewportIndex, {
|
||||
dom: enabledElement
|
||||
})
|
||||
);
|
||||
},
|
||||
|
||||
onMeasurementsChanged: (event, action) => {
|
||||
const {
|
||||
onAdded,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user