Skip to content

Commit

Permalink
RadioMenuItem is too confusing
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Nov 6, 2018
1 parent 0b0ba00 commit ff8632e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
15 changes: 4 additions & 11 deletions src/JBrowse/View/Track/Alignments2.js
Expand Up @@ -83,22 +83,19 @@ return declare( [ CanvasFeatureTrack, AlignmentsMixin ], {
});
}


displayOptions.push({
label: 'View coverage',
type: 'dijit/RadioMenuItem',
group: 'g2',
onClick: function(event) {
thisB.config.type = 'JBrowse/View/Track/SNPCoverage'
thisB.config._oldAlignmentsHeight = thisB.config.style.height
thisB.config.style.height = thisB.config._oldSnpCoverageHeight
thisB.browser.publish('/jbrowse/v1/v/tracks/replace', [thisB.config]);
}
});

console.log(this.config.viewAsPairs == false && this.config.readCloud == false)
displayOptions.push({
label: 'View normal',
type: 'dijit/RadioMenuItem',
group: 'g2',
onClick: function(event) {
thisB.config.viewAsPairs = false
thisB.config.readCloud = false
Expand All @@ -107,10 +104,10 @@ return declare( [ CanvasFeatureTrack, AlignmentsMixin ], {
}
});


console.log('t1',this.config.viewAsPairs == true && this.config.readCloud == false)
displayOptions.push({
label: 'View as pairs',
type: 'dijit/RadioMenuItem',
group: 'g2',
onClick: function(event) {
thisB.config.viewAsPairs = true
thisB.config.readCloud = false
Expand All @@ -121,8 +118,6 @@ return declare( [ CanvasFeatureTrack, AlignmentsMixin ], {

displayOptions.push({
label: 'View paired arcs',
type: 'dijit/RadioMenuItem',
group: 'g2',
onClick: function(event) {
thisB.config.viewAsPairs = true
thisB.config.readCloud = true
Expand All @@ -132,8 +127,6 @@ return declare( [ CanvasFeatureTrack, AlignmentsMixin ], {
});
displayOptions.push({
label: 'View pairs as read cloud',
type: 'dijit/RadioMenuItem',
group: 'g2',
onClick: function(event) {
thisB.config.viewAsPairs = true
thisB.config.readCloud = true
Expand Down
3 changes: 3 additions & 0 deletions src/JBrowse/View/Track/BlockBased.js
Expand Up @@ -19,6 +19,7 @@ define( [
'dijit/MenuItem',
'dijit/CheckedMenuItem',
'dijit/MenuSeparator',
'dijit/RadioMenuItem',
'JBrowse/Util',
'JBrowse/Component',
'JBrowse/FeatureFiltererMixin',
Expand Down Expand Up @@ -49,6 +50,7 @@ define( [
dijitMenuItem,
dijitCheckedMenuItem,
dijitMenuSeparator,
dijitRadioMenuItem,
Util,
Component,
FeatureFiltererMixin,
Expand Down Expand Up @@ -767,6 +769,7 @@ return declare( [Component,DetailsMixin,FeatureFiltererMixin,Destroyable],
var class_ = {
'dijit/MenuItem': dijitMenuItem,
'dijit/CheckedMenuItem': dijitCheckedMenuItem,
'dijit/RadioMenuItem': dijitRadioMenuItem,
'dijit/MenuSeparator': dijitMenuSeparator
}[spec.type] || dijitMenuItem;

Expand Down
2 changes: 0 additions & 2 deletions src/JBrowse/View/Track/SNPCoverage.js
Expand Up @@ -287,8 +287,6 @@ return declare( [WiggleXY, AlignmentsMixin],

displayOptions.push({
label: 'View alignments',
type: 'dijit/RadioMenuItem',
group: 'g2',
onClick: function(event) {
thisB.config.type = 'JBrowse/View/Track/Alignments2'
thisB.config._oldSnpCoverageHeight = thisB.config.style.height
Expand Down

0 comments on commit ff8632e

Please sign in to comment.