WIP: Add an interactive viewer for local features in study results#273
WIP: Add an interactive viewer for local features in study results#273brianhelba wants to merge 1 commit into
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.
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.
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.
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.
| // 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.
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.
Once OpenGeoscience/geojs#682 is released, this should probably toggle visibility of the entire layer, rather than just the pixelmap feature.
No description provided.