-
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
Prefer annotation zoom over dataset zoom #3992
Conversation
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.
Good job finding the cause of this subtle bug. 👍
I made a suggestion for a more generic solution :)
@@ -122,7 +122,13 @@ export async function initialize( | |||
// There is no need to reinstantiate the DataLayers if the dataset didn't change. | |||
if (initialFetch) { | |||
initializationInformation = initializeDataLayerInstances(); | |||
if (tracing != null) Store.dispatch(setZoomStepAction(getSomeServerTracing(tracing).zoomLevel)); | |||
if (tracing != null) { |
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'd suggest not moving the code here, but rather to keep it in the determineDefaultState
function, because you would expect it there. This line just sets "any" zoomstep, because other steps early in the initialization need a valid zoomstep.
I'll add a suggestion in the determineDefaultState
function.
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.
So just to make it clear, I'd revert the changes in this file and apply the suggested fix in the model_initialization.js
if (urlState.zoomStep != null) { | ||
({ zoomStep } = urlState); | ||
} | ||
const { zoomStep } = urlState; |
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'd suggest handling the zoomstep case the same way as the position and rotation, this should fix the bug as well:
let zoomStep = datasetConfiguration.zoom;
if (tracing != null) {
zoomStep = getSomeServerTracing(tracing).zoomLevel;
}
if (urlState.zoomStep != null) {
({ zoomStep } = urlState);
}
(untested)
@daniel-wer Thanks for your feedback and solution 👍 . I applied your feedback. As I can not reproduce the bug, I don't know a way how to test whether these changes fix the bug. From a logical perspective (looking at the code changes) I'd say that this PR fixes the bug. |
@MichaelBuessemeyer Yes, sounds good :) |
* master: (43 commits) update screenshots (#4038) docker: don't set sbt/ivy cache (#4034) Slow down brush size change for small sizes (#4012) voulme tool bar now depends only on the active tool (#4029) Allow user to adapt GPU memory consumption to allow for better quality (#4015) Updates the Docs (#4020) hiding pricing and features in iframe (#4019) Fix sitemap for publication detail view (#4024) Add sitemap.xml (#4006) Allow empty trees (#4010) Prefer annotation zoom over dataset zoom (#3992) Add details view for publications (#3994) remove enzyme test (#3997) Tensorflow segmentation (#3461) ensure that max zoom step is not exceeded when changing viewport area (#3996) allow isosurfaces for hybrid tracings when setting window.allowIsosurfaces (#3998) re-fetch buckets if fetching them failed (#3999) Only re-compute bounding sphere of skeletons if something changed (#3995) Fix dropdown login padding (#3988) Persist tree visibility (#3942) ...
This PR changes the initialization of tracings and so that the zoom level of annotations is preferred over the zoom set as default by the dataset.
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
[ ] Updated changelog[ ] Updated migration guide if applicable[ ] Updated documentation if applicable[ ] Adapted wk-connect if datastore API changes[ ] Needs datastore update after deployment