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

Reverse order of displayed subfeatures when the parent feature is on … #1114

Merged
merged 1 commit into from Jul 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/JBrowse/View/Track/_FeatureDetailMixin.js
Expand Up @@ -114,6 +114,10 @@ return declare( FeatureDescriptionMixin, {
var thisB = this;
var subfeatures = f.get('subfeatures');
if( subfeatures && subfeatures.length ) {
if( f.get('strand') == -1 ) {
// Feature is on the oposite strand, lets reverse the order of the subfeatures according to their start position
subfeatures.sort(function( a, b ) { return b.get('start')-a.get('start') });
}
if( !(track.config.subfeatureDetailLevel != null) || layer < track.config.subfeatureDetailLevel ) {
this._subfeaturesDetail( track, subfeatures, container, f, layer + 1 );
}
Expand Down