Commit d24c2a40 by MARIJON Pierre

move javascript code for hide unhide graph in javascript template

parent 98ff660f
......@@ -7,9 +7,6 @@
<div>
<button id="hide_canu_contig_mini">Show contig projection</button>
<script>
hide_unhide_button('hide_canu_contig_mini', 'canu_contig_mini', 'contig projection');
</script>
</div>
<div id="canu_contig_mini" class="graph_image">
<img class="eighty_img" src="data:image/png;base64,{{canu_contig_mini}}"/>
......
......@@ -25,9 +25,6 @@ contigs.
<div>
<button id="hide_canu_contig_on_paf">Show contig projection</button>
<script>
hide_unhide_button("hide_canu_contig_on_paf", "canu_contig_on_paf", "contig projection");
</script>
</div>
<div id="canu_contig_on_paf" class="graph_image">
......
......@@ -22,9 +22,6 @@ The BOG (Best Overlap Graph) is the main graph of Canu
<div>
<button id="hide_bog">Show BOG</button>
<script>
hide_unhide_button('hide_bog', 'canu_bog', 'BOG');
</script>
</div>
<div id="canu_bog" class="graph_image">
......@@ -163,9 +160,6 @@ canvas.width = 1470; canvas.height = 1000;
<div>
<button id="hide_canu_paf">Show Canu PAF</button>
<script>
hide_unhide_button('hide_canu_paf', 'canu_paf', 'Canu PAF');
</script>
</div>
<div id="canu_paf" class="graph_image">
<img src="data:image/png;base64,{{canu_paf}}"/>
......@@ -176,9 +170,6 @@ hide_unhide_button('hide_canu_paf', 'canu_paf', 'Canu PAF');
<div>
<button id="hide_contig">Show Canu contigs</button>
<script>
hide_unhide_button('hide_contig', 'canu_contig', 'Canu contigs');
</script>
</div>
<div id="canu_contig" class="graph_image">
......@@ -189,9 +180,6 @@ hide_unhide_button('hide_contig', 'canu_contig', 'Canu contigs');
<div>
<button id="hide_unitig">Show Canu unitigs</button>
<script>
hide_unhide_button('hide_unitig', 'canu_unitig', 'Canu unitigs');
</script>
</div>
<div id="canu_unitig" class="graph_image">
<img src="data:image/png;base64,{{canu_unitig}}"/>
......
......@@ -3,7 +3,12 @@
{% include 'sorttable.js.jinja2.html' %}
function hide_unhide_button(button_id, div_id, button_text)
{
{
if(document.getElementById(button_id) == null)
{
return;
}
document.getElementById(button_id).onclick = function()
{
if(document.getElementById(div_id).style.display == 'inline-block') {
......@@ -56,7 +61,17 @@ function generate_navigation_menu()
function onload_call_function()
{
// Navigation menu
generate_navigation_menu();
//hide unhide image
hide_unhide_button('hide_canu_contig_mini', 'canu_contig_mini', 'contig projection');
hide_unhide_button("hide_canu_contig_on_paf", "canu_contig_on_paf", "contig projection");
hide_unhide_button('hide_bog', 'canu_bog', 'BOG');
hide_unhide_button('hide_canu_paf', 'canu_paf', 'Canu PAF');
hide_unhide_button('hide_contig', 'canu_contig', 'Canu contigs');
hide_unhide_button('hide_unitig', 'canu_unitig', 'Canu unitigs');
hide_unhide_button('hide_miniasm', 'miniasm_gfa', 'Miniasm');
}
document.addEventListener('DOMContentLoaded', onload_call_function, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment