Skip to content

Commit baf9c26

Browse files
committed
Add a separate colour for unknown gene and func.
Nodes with unknown enabler and unknown molecular function now have their own colour.
1 parent 1c5cdf9 commit baf9c26

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

‎gocam_view/templates/gocam_view/index.html‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,18 +580,19 @@
580580
'width': '110px',
581581
'height': '40px',
582582
'background-color': function(el) {
583-
const type = el.data()['type'];
583+
const data = el.data();
584+
const type = data['type'];
584585
if (type == 'chemical') {
585586
return '#b2dfdb';
586587
} else if (type == 'modified_protein') {
587588
return '#b2bfef';
588589
} else if (type == 'gene') {
589590
return '#b2fbef';
590591
} else if (type == 'enabled_by_gene') {
591-
if (el.data()['label'] == 'molecular_function') {
592+
if (data['label'] == 'molecular_function') {
592593
return '#ffd3d4';
593594
} else {
594-
if (el.data()['label'].startsWith('obsolete ')) {
595+
if (data['label'].startsWith('obsolete ')) {
595596
return '#eee';
596597
} else {
597598
return '#c8e6c9';
@@ -607,8 +608,14 @@
607608
return '#ffe6ff';
608609
} else if (type == 'enabled_by_modified_protein') {
609610
return '#d8c5ff';
611+
} else if (type == 'enabled_by_unknown') {
612+
if (data['label'] == 'molecular_function') {
613+
return '#ffc374';
614+
} else {
615+
return '#ee7';
616+
}
610617
} else {
611-
return '#ee7';
618+
return '#bb9';
612619
}
613620
},
614621
'background-opacity': function(el) {

0 commit comments

Comments
 (0)