Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brianhelba
Copy link
Member

No description provided.

@brianhelba brianhelba force-pushed the local-features-viewer branch from 583b6cd to 87067e8 Compare November 3, 2016 17:58
@brianhelba
Copy link
Member Author

@msmolens I'd like to discuss this when you have time. It's still a WIP, as the layout of the rendered StudyResultsLocalFeaturesView is still having problems with GeoJS (which requires a fixed size element). However, the refactoring of view classes is basically complete, and I want to get your thoughts on this approach to handling the StudyResults views and models.

* 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).
Copy link
Contributor

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);
Copy link
Contributor

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
Copy link
Contributor

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);
Copy link
Contributor

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.

@brianhelba brianhelba force-pushed the local-features-viewer branch from 87067e8 to 47beaea Compare November 19, 2016 18:10
@brianhelba brianhelba force-pushed the local-features-viewer branch 2 times, most recently from 8876887 to c389cc1 Compare December 13, 2016 16:19
@brianhelba brianhelba force-pushed the local-features-viewer branch from c389cc1 to 1e89821 Compare February 2, 2017 22:13
@brianhelba brianhelba force-pushed the local-features-viewer branch from 1e89821 to 8383c30 Compare February 23, 2017 23:20
@brianhelba brianhelba force-pushed the local-features-viewer branch from 8383c30 to f2a343e Compare February 28, 2017 16:47
this.clear();

this.pixelmap.data(featureValues);
this.pixelmap.visible(true);
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants