wip on react transition 10
This commit is contained in:
parent
33fad2f317
commit
aa170e9a89
@ -185,8 +185,7 @@ class CornerstoneViewport extends Component {
|
|||||||
viewport={
|
viewport={
|
||||||
this.state.viewport
|
this.state.viewport
|
||||||
}
|
}
|
||||||
/> </div > <div className="viewportInstructions" >
|
/> </div > {
|
||||||
Please drag a stack here to view images. </div> {
|
|
||||||
this.displayScrollbar && (<ImageScrollbar
|
this.displayScrollbar && (<ImageScrollbar
|
||||||
onInputCallback={
|
onInputCallback={
|
||||||
this.imageSliderOnInputCallback
|
this.imageSliderOnInputCallback
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
overflow: hidden
|
overflow: hidden
|
||||||
|
|
||||||
.viewportInstructions
|
.viewportInstructions
|
||||||
display: none
|
display: block
|
||||||
font-size: 13px
|
font-size: 13px
|
||||||
theme('color', '$textSecondaryColor')
|
theme('color', '$textSecondaryColor')
|
||||||
line-height: 18px
|
line-height: 18px
|
||||||
|
|||||||
@ -77,6 +77,10 @@ class GridLayout extends Component {
|
|||||||
const viewports = viewportData.map((data, index) => {
|
const viewports = viewportData.map((data, index) => {
|
||||||
const className = `viewportContainer ${this.getClass(index)} ${this.getActiveClass(index)}`;
|
const className = `viewportContainer ${this.getClass(index)} ${this.getActiveClass(index)}`;
|
||||||
|
|
||||||
|
// TODO[react]: Not sure why I needed to do this. Looks like
|
||||||
|
// empty viewports aren't provided with a viewportIndex normally?
|
||||||
|
data.viewportIndex = index;
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
height: `${height}%`,
|
height: `${height}%`,
|
||||||
width: `${width}%`,
|
width: `${width}%`,
|
||||||
@ -91,16 +95,28 @@ class GridLayout extends Component {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let contents;
|
||||||
|
if (!data.studyInstanceUid || !data.displaySetInstanceUid) {
|
||||||
|
contents = (
|
||||||
|
<div className="CornerstoneViewport">
|
||||||
|
<div className="viewportInstructions">
|
||||||
|
Please drag a stack here to view images.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
} else if (data.plugin === 'cornerstone') {
|
||||||
|
contents = cornerstoneViewport(data);
|
||||||
|
} else {
|
||||||
|
contents = pluginViewport(data);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={index} className={className} style={styles}>
|
<div key={index} className={className} style={styles}>
|
||||||
{data.plugin === 'cornerstone' ?
|
{contents}
|
||||||
cornerstoneViewport(data) :
|
|
||||||
pluginViewport(data)
|
|
||||||
}
|
|
||||||
{/*{>seriesQuickSwitch (clone this viewport=viewport viewportIndex=@index)}*/}
|
{/*{>seriesQuickSwitch (clone this viewport=viewport viewportIndex=@index)}*/}
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
})
|
});
|
||||||
|
|
||||||
const layoutClass = `layout-${rows}-${columns}`;
|
const layoutClass = `layout-${rows}-${columns}`;
|
||||||
|
|
||||||
|
|||||||
4
StandaloneViewer/.gitignore
vendored
4
StandaloneViewer/.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
myOutputFolder/
|
myOutputFolder/
|
||||||
node_modules
|
node_modules
|
||||||
client/sha.js
|
StandaloneViewer/client/sha.js
|
||||||
client/version.js
|
StandaloneViewer/client/version.js
|
||||||
Loading…
Reference in New Issue
Block a user