-
Notifications
You must be signed in to change notification settings - Fork 21
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
Allow for annotating image-sequences when annotations not already present #18
Conversation
This will mega-conflict with #17 @BryonLewis was first, so the git gods command ye to rebase (after he merges). :( |
062efe9
to
723e493
Compare
This should be good regarding conflicts with #17. Since I've rebased off that branch, this PR should wait until that one is merged. |
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.
couple of little things.
}); | ||
|
||
detections = data | ||
? data.map(detection => Object.freeze(detection)) |
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 know it was never commented before, but using object.freeze to protect objects from reactivity like this really deserves some explanation. Some developer will come along later and wonder what was going on.
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'm not sure why it's being done either, it was there before I came onto the project. I think it's deserving of it's own PR though.
client/src/views/Viewer.vue
Outdated
@@ -422,6 +422,11 @@ export default { | |||
/* END TODO */ | |||
async loadDataset(datasetId) { | |||
var { data: dataset } = await this.girderRest.get(`folder/${datasetId}`); | |||
|
|||
if (!dataset) { | |||
throw "Could not fetch dataset!"; |
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 found an old stackoverflow thread that says this behaves unexpectedly in IE and safari, but that was in 2012. My gut says throw new Error()
should always be used, but maybe you know something I don't.
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.
LGTM, thanks!
This addresses the major concern raised by @mattdawkins. The diff is fairly large, as there needed to be several changes to get this to work, including fixing usability.