Fix passing children into cornerstone-extension
This commit is contained in:
parent
6a3c257cb3
commit
e1f1d9b630
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ohif-cornerstone-extension",
|
"name": "ohif-cornerstone-extension",
|
||||||
"version": "0.0.13",
|
"version": "0.0.14",
|
||||||
"description": "OHIF extension for Cornerstone",
|
"description": "OHIF extension for Cornerstone",
|
||||||
"author": "OHIF",
|
"author": "OHIF",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@ -168,11 +168,11 @@ class OHIFCornerstoneViewport extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const childrenWithProps = null;
|
let childrenWithProps = null;
|
||||||
|
|
||||||
// TODO: Does it make more sense to use Context?
|
// TODO: Does it make more sense to use Context?
|
||||||
if (this.props.children && this.props.children.length) {
|
if (this.props.children && this.props.children.length) {
|
||||||
this.props.children.map((child, index) => {
|
childrenWithProps = this.props.children.map((child, index) => {
|
||||||
return React.cloneElement(child, { viewportIndex: this.props.viewportIndex, key: index})
|
return React.cloneElement(child, { viewportIndex: this.props.viewportIndex, key: index})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user