Skip to content

Commit 1852c9c

Browse files
committed
Display complex members above the list of inputs
Refs pombase/pombase-gocam#111
1 parent 0cb8f03 commit 1852c9c

1 file changed

Lines changed: 16 additions & 17 deletions

File tree

gocam_view/templates/gocam_view/index.html

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,22 @@
902902
newContent += '</div>';
903903
}
904904

905+
if (currentData.has_part_genes && currentData.has_part_genes.length > 0) {
906+
newContent += '<div><div>complex members:</div>';
907+
for (const id of currentData.has_part_genes) {
908+
let label = id;
909+
if (geneInfoMap[id]) {
910+
label = geneInfoMap[id];
911+
}
912+
if (highlightGeneIds.has(id)) {
913+
newContent += '<div class="gene-in-complex highlighted-gene">' + makeLink('PomBase:' + id, label) + '</div>';
914+
} else {
915+
newContent += '<div class="gene-in-complex">' + makeLink('PomBase:' + id, label) + '</div>';
916+
}
917+
}
918+
newContent += '</div>';
919+
}
920+
905921
if (currentData.has_input && currentData.has_input.length > 0) {
906922
newContent += '<div class="inputs-outputs">inputs:</div><ul class="input-output-list">';
907923
for (const hasInput of currentData.has_input) {
@@ -971,23 +987,6 @@
971987
newContent += '</ul>';
972988
}
973989
}
974-
975-
if (currentData.has_part_genes && currentData.has_part_genes.length > 0) {
976-
newContent += '<div><div>complex members:</div>';
977-
for (const id of currentData.has_part_genes) {
978-
let label = id;
979-
if (geneInfoMap[id]) {
980-
label = geneInfoMap[id];
981-
}
982-
if (highlightGeneIds.has(id)) {
983-
newContent += '<div class="gene-in-complex highlighted-gene">' + makeLink('PomBase:' + id, label) + '</div>';
984-
} else {
985-
newContent += '<div class="gene-in-complex">' + makeLink('PomBase:' + id, label) + '</div>';
986-
}
987-
}
988-
newContent += '</div>';
989-
}
990-
991990
contentDiv.innerHTML = newContent;
992991
} else {
993992
contentDiv.innerHTML = '';

0 commit comments

Comments
 (0)