Skip to content

Commit

Permalink
gotthe styling correct
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Jan 21, 2019
1 parent d94171e commit 16de738
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
23 changes: 13 additions & 10 deletions client/apollo/css/webapollo_track_styles.css
Expand Up @@ -832,27 +832,30 @@ div.track_webapollo_view_track_annotsequencetrack div.track-label .track-close-b

.jbrowse .terminator {
position: absolute;
height: 12px;
height: 16px;
z-index: 100;
background-color: black;
/*background-color: black;*/
background-repeat: no-repeat;
background-size: 9px 11px;
background-size: 9px 15px;


/* TODO: remove when we have another strand type */
background-image: url('../img/plus-terminator.png');
background-position: bottom left; /* center image vertically */
background-position: bottom center; /* center image vertically */
}


.jbrowse .plus-terminator {
background-image: url('../img/plus-terminator.png');
background-position: bottom left; /* center image vertically */
.jbrowse .terminator-render {
position: absolute;
height: 10px;
z-index: 100;
background-color: black;
}


.jbrowse .minus-terminator {
background-image: url('../img/minus-terminator.png');
background-position: bottom right; /* center image vertically */
}

.jbrowse .plus-terminator {
}

.jbrowse .transposable_element,
Expand Down
25 changes: 22 additions & 3 deletions client/apollo/js/View/Track/AnnotTrack.js
Expand Up @@ -1147,6 +1147,7 @@ define([
var biotype ;

// TODO: pull from the server at some point
// TODO: this list is duplicated
var recognizedBioType = [
'transcript' ,'tRNA','snRNA','snoRNA','ncRNA','rRNA','mRNA','miRNA','repeat_region','transposable_element','terminator'
];
Expand Down Expand Up @@ -6606,6 +6607,10 @@ define([
},

initAnnotContextMenu: function () {

// TODO: this list is duplicated
var topTypes = ['repeat_region','transposable_element','gene','pseudogene', 'SNV', 'SNP', 'MNV', 'MNP', 'indel', 'insertion', 'deletion','terminator'];

var thisB = this;
contextMenuItems = new Array();
annot_context_menu = new dijit.Menu({});
Expand Down Expand Up @@ -6646,7 +6651,6 @@ define([
var selected = thisB.selectionManager.getSelection();
var selectedFeature = selected[0].feature;
var selectedFeatureDetails = selectedFeature.afeature;
var topTypes = ['repeat_region','transposable_element','gene','pseudogene', 'SNV', 'SNP', 'MNV', 'MNP', 'indel', 'insertion', 'deletion'];
while(selectedFeature ){
if(topTypes.indexOf(selectedFeatureDetails.type.name)>=0){
thisB.getApollo().viewInAnnotationPanel(selectedFeatureDetails.name);
Expand Down Expand Up @@ -6737,13 +6741,28 @@ define([
thisB.changeAnnotationType("miRNA");
}
}));
changeAnnotationMenu.addChild(new dijitMenuItem( {
label: "terminator",
onclick: function(event) {
var selected = thisB.selectionManager.getSelection();
var selectedFeatureType = selected[0].feature.afeature.type.name === "exon" ?
selected[0].feature.afeature.parent_type.name : selected[0].feature.afeature.type.name;
if (selectedFeatureType != "transposable_element" && selectedFeatureType != "repeat_region") {
var message = "Warning: You will not be able to revert back to " + selectedFeatureType + " via 'Change annotation type' menu option, use 'Undo' instead. Do you want to proceed?";
thisB.confirmChangeAnnotationType(thisB, [selected], "terminator", message);
}
else {
thisB.changeAnnotationType("terminator");
}
}
}));
changeAnnotationMenu.addChild(new dijitMenuItem( {
label: "repeat_region",
onClick: function(event) {
var selected = thisB.selectionManager.getSelection();
var selectedFeatureType = selected[0].feature.afeature.type.name === "exon" ?
selected[0].feature.afeature.parent_type.name : selected[0].feature.afeature.type.name;
if (selectedFeatureType != "transposable_element") {
if (selectedFeatureType != "transposable_element" && selectedFeatureType != "terminator" ) {
var message = "Warning: You will not be able to revert back to " + selectedFeatureType + " via 'Change annotation type' menu option, use 'Undo' instead. Do you want to proceed?";
thisB.confirmChangeAnnotationType(thisB, [selected], "repeat_region", message);
}
Expand All @@ -6758,7 +6777,7 @@ define([
var selected = thisB.selectionManager.getSelection();
var selectedFeatureType = selected[0].feature.afeature.type.name === "exon" ?
selected[0].feature.afeature.parent_type.name : selected[0].feature.afeature.type.name;
if (selectedFeatureType != "repeat_region") {
if (selectedFeatureType != "repeat_region" && selectedFeatureType != "terminator") {
var message = "Warning: You will not be able to revert back to " + selectedFeatureType + " via 'Change annotation type' menu option, use 'Undo' instead. Do you want to proceed?";
thisB.confirmChangeAnnotationType(thisB, [selected], "transposable_element", message);
}
Expand Down
2 changes: 1 addition & 1 deletion client/apollo/json/annot.json
Expand Up @@ -24,7 +24,7 @@
"arrowheadClass" : "annot-arrowhead",
"alternateClasses" : {
"terminator" : {
"renderClassName" : "terminatort annot-apollo",
"renderClassName" : "terminator-render annot-apollo",
"className" : "terminator"
},
"transposable_element" : {
Expand Down

0 comments on commit 16de738

Please sign in to comment.