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

Fix that 3d view broke if it had no width #5588

Merged
merged 2 commits into from
Jun 28, 2021
Merged

Fix that 3d view broke if it had no width #5588

merged 2 commits into from
Jun 28, 2021

Conversation

daniel-wer
Copy link
Member

@daniel-wer daniel-wer commented Jun 24, 2021

The condition that checked whether the 3d view was not visible, to avoid updating the camera state in that case, was too unspecific. It only checked whether the 3d view had 0 height (and not straightforward, but only by checking whether the result of a division was NaN), but not whether it had 0 width. I changed the condition to be more explicit and complete.

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • Easier reproduction instructions than in the issue
  • Move the vertical splitter (from between the viewports) all the way to the right so that the 3d view is no longer visible.
  • Move it back -> the 3d view content should be visible again (on master it is not)

Issues:


@daniel-wer daniel-wer self-assigned this Jun 24, 2021
Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works great and the code looks better, too 🚀

@daniel-wer daniel-wer merged commit 78e7433 into master Jun 28, 2021
@daniel-wer daniel-wer deleted the fix-tdview-nan branch June 28, 2021 08:08
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

Successfully merging this pull request may close these issues.

Reducing size of 3d Viewport to (0,0) crashes it.
2 participants