Commit | Line | Data |
81422c40 |
1 | var colors = ['#ffeeaa','#afc6e9','#d5fff6','#ffccaa','#ffaaaa','#e5ff80','#e5d5ff','#ffd5e5']; |
361134f0 |
2 | var row_triggered = false; |
23306161 |
3 | |
4 | function color_row( row ) { |
361134f0 |
5 | row_triggered = true; |
57acbbe2 |
6 | $('ellipse').attr( {stroke:'white', fill:'#fff'} ); |
119157ee |
7 | $('.node').children('polygon').attr( {stroke:'#fff', fill:'#fff'} ); |
8 | $('.node').children('text').attr( {stroke:'none', fill:'#000'} ); |
d5c17cec |
9 | $('tr.active_variant_row').children('td').removeClass('cellb0 cellb1 cellb2 cellb3 cellb4 cellb5 cellb6 cellb7'); |
23306161 |
10 | row.parent().nextAll('.clickable').children('span').click(); |
d5c17cec |
11 | $('td.active_variant_cell').removeClass('active_variant_cell'); |
361134f0 |
12 | row_triggered = false; |
23306161 |
13 | } |
14 | |
82fd8e05 |
15 | function color_nodes( column_index, arr_node_ids, arr_greynode_ids ) { |
d5c17cec |
16 | if( !row_triggered ) { |
17 | $('tr.active_variant_row').children('td').removeClass('cellb0 cellb1 cellb2 cellb3 cellb4 cellb5 cellb6 cellb7'); |
18 | $('td.active_variant_cell').removeClass('active_variant_cell'); |
57acbbe2 |
19 | $('ellipse').attr( {stroke:'white', fill:'#fff'} ); |
119157ee |
20 | $('.node').children('polygon').attr( {stroke:'#fff', fill:'#fff'} ); |
21 | $('.node').children('text').attr( {stroke:'none', fill:'#000'} ); |
82fd8e05 |
22 | }; |
d5c17cec |
23 | $('tr.active_variant_row').removeClass('active_variant_row') |
82fd8e05 |
24 | jQuery.each( arr_greynode_ids, function(index,value) { |
119157ee |
25 | nodes = $('.node').children('title').filter( function(index) { |
82fd8e05 |
26 | return $(this).text() == value; |
119157ee |
27 | }) |
28 | nodes.siblings('ellipse, polygon, text').each( function( index ) { |
29 | $(this).attr( {stroke:'#ddd', fill:'#f8f8f8'} ); |
82fd8e05 |
30 | }); |
31 | }); |
dbcf12a6 |
32 | jQuery.each( arr_node_ids, function(index,value) { |
33 | $('.node').children('title').filter( function(index) { |
34 | return $(this).text() == value; |
94a077d6 |
35 | }).siblings('ellipse').each( function( index ) { |
361134f0 |
36 | $(this).attr( {stroke:'black', fill:colors[column_index-1]} ); |
37 | }); |
dbcf12a6 |
38 | }); |
39 | } |