Skip to content

Commit 0bd5eea

Browse files
authored
Merge pull request #91 from tamaynard/fix-orientation-axes
fix(View): Fix showOrientationAxes error
2 parents a1df59e + cb10ab3 commit 0bd5eea

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/core/ViewContainer.js

+7-10
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)