Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

showOrientationAxis doesn't work anymore #78

Open
WesleyTheGeolien opened this issue Sep 9, 2022 · 3 comments
Open

showOrientationAxis doesn't work anymore #78

WesleyTheGeolien opened this issue Sep 9, 2022 · 3 comments

Comments

@WesleyTheGeolien
Copy link
Contributor

It looks like: #59 introduced a bug meaning View components with showOrientationAxis={true} no longer works. here is a codesandbox demo: https://codesandbox.io/s/react-vtk-with-data-template-k86emm?file=/src/App.js

I believe there are 2 approaches:

  • force the user to specify a renderer and renderwindow
  • if renderer and renderwindow are undefined create them as before (probably better?)

Happy to do the PR if you guide upon which solution is preferred

@jourdain
Copy link
Collaborator

jourdain commented Sep 9, 2022

@floryst what do you think?

@floryst
Copy link
Collaborator

floryst commented Sep 13, 2022

I think all we need to do is move this block of code into the constructor, since that DidMount hook will run after the child <View /> DidMount hook finishes. This is effectively the same idea as your second approach, with the renderer being added to the render window prior to anything being done with it.

@floryst
Copy link
Collaborator

floryst commented Sep 13, 2022

@WesleyTheGeolien that block should go right around here. If that change works for you locally, it would be great if you could submit a PR for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants