-
Notifications
You must be signed in to change notification settings - Fork 10
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
WIP: Add an interactive viewer for local features in study results #273
base: master
Are you sure you want to change the base?
Conversation
583b6cd
to
87067e8
Compare
@msmolens I'd like to discuss this when you have time. It's still a WIP, as the layout of the rendered |
* model; this may change and this view will update. | ||
* @param {isic.models.FeaturesetModel} settings.featureset - The featureset | ||
* of the study for the annotation; this should never change (delete and | ||
* re-instantiate this view for a new study). |
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 don't see where we re-instantiate the view.
var featuresetLocalFeatures = this.featureset.get('localFeatures'); | ||
var annotationValues = this.annotation.get('annotations'); | ||
availableFeatures = featuresetLocalFeatures.filter(_.bind(function (feature) { | ||
return _.has(annotationValues, feature.id); |
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 see errors here when selecting users, like:
underscore.js:1046 Uncaught TypeError: Cannot convert undefined or null to object(…)
x.has @ underscore.js:1046
(anonymous function) @ StudyResultsLocalFeaturesView.js:111
|
||
// Container for images associated with tabs. Visibility is controlled by logic in StudyResultsView.js. | ||
.isic-study-results-flex-grow.isic-study-results-image-container | ||
|
||
// Local features image container |
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.
It makes sense that this should not be outside the local features view. But the reason for this is that I couldn't get the layout to work otherwise in conjunction with the Bootstrap tabs. I realize the styling isn't complete on this WIP, but I can't be convinced that this restructuring is okay until the layout and interaction work as before.
@@ -470,20 +287,20 @@ isic.views.StudyResultsView = isic.View.extend({ | |||
events: { | |||
// Update image visibility when image preview tab is activated | |||
'shown.bs.tab #isic-study-results-image-preview-tab': function (event) { | |||
this.localFeaturesImageView.setVisible(false); | |||
this.localFeaturesView.setVisible(false); |
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.
It's confusing that the visibility for the element #isic-study-results-local-features-tab-content
' is controlled both through the Bootstrap tab mechanism and in code.
87067e8
to
47beaea
Compare
8876887
to
c389cc1
Compare
c389cc1
to
1e89821
Compare
1e89821
to
8383c30
Compare
8383c30
to
f2a343e
Compare
this.clear(); | ||
|
||
this.pixelmap.data(featureValues); | ||
this.pixelmap.visible(true); |
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.
Once OpenGeoscience/geojs#682 is released, this should probably toggle visibility of the entire layer, rather than just the pixelmap feature.
No description provided.