Skip to content

Commit

Permalink
Maintain heights across switches in configs
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Oct 31, 2018
1 parent a771528 commit 204d2b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/JBrowse/View/Track/Alignments2.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ return declare( [ CanvasFeatureTrack, AlignmentsMixin ], {
group: 'g2',
onClick: function(event) {
thisB.config.type = 'JBrowse/View/Track/SNPCoverage'
thisB.config.style.height = 200
thisB.config._oldAlignmentsHeight = thisB.config.style.height
thisB.config.style.height = thisB.config._oldSnpCoverageHeight
thisB.browser.publish('/jbrowse/v1/v/tracks/replace', [thisB.config]);
}
});
Expand Down
3 changes: 2 additions & 1 deletion src/JBrowse/View/Track/SNPCoverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ return declare( [WiggleXY, AlignmentsMixin],
group: 'g2',
onClick: function(event) {
thisB.config.type = 'JBrowse/View/Track/Alignments2'
thisB.config.style.height = 7
thisB.config._oldSnpCoverageHeight = thisB.config.style.height
thisB.config.style.height = thisB.config._oldAlignmentsHeight
thisB.browser.publish('/jbrowse/v1/v/tracks/replace', [thisB.config]);
}
});
Expand Down

0 comments on commit 204d2b2

Please sign in to comment.