-
Notifications
You must be signed in to change notification settings - Fork 24
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
Make isosurfaces more robust #5102
Conversation
…equests; indicate loading state of isosurfaces also on initial request
@@ -207,9 +212,10 @@ function* loadIsosurfaceWithNeighbors( | |||
seedPosition != null ? seedPosition : yield* select(state => getFlooredPosition(state.flycam)); | |||
const clippedPosition = clipPositionToCubeBoundary(position, zoomStep, resolutionInfo); | |||
let positionsToRequest = [clippedPosition]; | |||
if (seedPosition) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grittaweisheit do you know why addIsosurfaceAction
is only dispatched if there is a seedPosition
? 1) The used position is set to the current annotation position and used as a seed if seedPosition == null
, so it should be fine to use that here, too? 2) I'm not really sure in which cases seedPosition
is null anyway. The signature states seedPosition: ?Vector
, but all callers seem to pass it if I'm not missing anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is because ensureSuitableIsosurface
is also called at every flycam movement, but we don't really want to add an isosurface then. And since there is no seed position in that case, that is the way I decided whether to dispatch the addIsosurfaceAction
or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, makes sense. Good point with the flycam-movement listener! I missed that. However, the "if seed position is null, we know it was caused by a flycam movement"-logic is a bit too hidden for me. I just changed the code to simply dispatch addIsosurfaceAction
everytime unless it already exists in the store. This is bit more intuitive and safer in my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, LGTM once your question was answered 👍
URL of deployed dev instance (used for testing):
Steps to test:
Issues: