File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,8 @@ class CornerstoneViewport extends Component {
102102 { name : 'StackScrollMouseWheel' } ,
103103 { name : 'StackScrollMultiTouch' }
104104 ] ,
105- viewportOverlayComponent : ViewportOverlay
105+ viewportOverlayComponent : ViewportOverlay ,
106+ shouldFitToWindowOnResize : false
106107 } ;
107108
108109 static propTypes = {
@@ -129,7 +130,8 @@ class CornerstoneViewport extends Component {
129130 viewportOverlayComponent : PropTypes . oneOfType ( [
130131 PropTypes . string ,
131132 PropTypes . func
132- ] )
133+ ] ) ,
134+ shouldFitToWindowOnResize : PropTypes . bool
133135 } ;
134136
135137 static loadIndicatorDelay = 45 ;
@@ -160,7 +162,7 @@ class CornerstoneViewport extends Component {
160162 return ;
161163 }
162164
163- cornerstone . resize ( this . element , true ) ;
165+ cornerstone . resize ( this . element , props . shouldFitToWindowOnResize ) ;
164166
165167 this . setState ( {
166168 viewportHeight : `${ this . element . clientHeight - 20 } px`
You can’t perform that action at this time.
0 commit comments