File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,11 +133,9 @@ export default class View extends Component {
133133
134134 this . openglRenderWindow = props . renderWindowView ;
135135
136- if ( props . interactive ) {
137- this . interactor = props . interactor ;
138- this . defaultStyle = vtkInteractorStyleManipulator . newInstance ( ) ;
139- this . style = this . defaultStyle ;
140- }
136+ this . interactor = props . interactor ;
137+ this . defaultStyle = vtkInteractorStyleManipulator . newInstance ( ) ;
138+ this . style = props . interactive ? this . defaultStyle : null ;
141139
142140 // Create orientation widget
143141 this . axesActor = vtkAxesActor . newInstance ( ) ;
@@ -194,8 +192,10 @@ export default class View extends Component {
194192 this . debouncedCubeBounds = debounce ( this . updateCubeBounds , 50 ) ;
195193
196194 this . setInteractorStyle = ( style ) => {
197- this . style = style ;
198- this . interactor . setInteractorStyle ( style ) ;
195+ if ( this . props . interactive ) {
196+ this . style = style ;
197+ this . interactor . setInteractorStyle ( style ) ;
198+ }
199199 } ;
200200
201201 // Internal functions
You can’t perform that action at this time.
0 commit comments