File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,24 +24,21 @@ class ViewController extends Component {
2424 this . renderWindow = vtkRenderWindow . newInstance ( ) ;
2525 this . openglRenderWindow = vtkOpenGLRenderWindow . newInstance ( ) ;
2626 this . interactor = vtkRenderWindowInteractor . newInstance ( ) ;
27- }
2827
29- this . onEnter = this . onEnter . bind ( this ) ;
30- this . onResize = this . onResize . bind ( this ) ;
31- this . setViewRef = this . setViewRef . bind ( this ) ;
32- }
33-
34- componentDidMount ( ) {
35- if ( ! this . props . root ) {
3628 this . renderWindow . addView ( this . openglRenderWindow ) ;
37-
38- if ( this . props . interactive ) {
29+ if ( props . interactive ) {
3930 this . interactor . setView ( this . openglRenderWindow ) ;
4031 this . interactor . initialize ( ) ;
4132 }
4233 }
34+
4335 this . renderWindow . addRenderer ( this . renderer ) ;
36+ this . onEnter = this . onEnter . bind ( this ) ;
37+ this . onResize = this . onResize . bind ( this ) ;
38+ this . setViewRef = this . setViewRef . bind ( this ) ;
39+ }
4440
41+ componentDidMount ( ) {
4542 const container = this . view ?. containerRef . current ;
4643 if ( this . view && container ) {
4744 container . addEventListener ( 'pointerenter' , this . onEnter ) ;
You can’t perform that action at this time.
0 commit comments