question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timing issue with new viewProxy's setOrientation()

See original GitHub issue

I’ve been working on updating some code to accommodate newer vtk.js releases and have run into an issue with the setOrientation method of the vtkViewProxy. For background, I’m working within a React framework and currently trying to update to vtk version 7.11.1. Before, I had set up the proper view orientation in the constructor of my component, then set container, added representations, subscriptions, etc. in the componentDidMount method and it worked just fine. Now, using relatively the same setup, I’m seeing an initial camera/view orientation that is somewhere in between the default and the values I input. After investigating a bit, I’m seeing that the callback within the returned Promise doesn’t complete until after the componentDidMount and even componentDidUpdate methods are called. I inserted some console logs and set a break point to demonstrate here (there are 2 Viewport3D components): image

I guess I have a couple questions about this: Is this indeed an issue with unexpected/undesired timing of events? If so, how can we modify that initial setup to ensure everything is properly setup before adding any representations and rendering. If not, what is the optimal workflow/pipeline for setting up the view, then adding representations, subscriptions, etc. and rendering?

Thanks for the help, -Logan

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
llangholz89commented, Oct 2, 2018

Right, I was thinking in addition to the logic you provided but just replacing that line I had indicated. I suppose it doesn’t matter. You can’t supply a callback to that Promise return anyway with it being within the initialization. I’ll put a PR together with just those changes. Thanks again!

0reactions
jourdaincommented, Oct 2, 2018

🎉 This issue has been resolved in version 7.11.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found