diff --git a/Makefile b/Makefile index b84853f..275c227 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ all: closure-compiler/build/compiler.jar js/fornac.js -js/fornac.js: +js/fornac.js: src/*.js java -jar closure-compiler/build/compiler.jar --compilation_level=SIMPLE_OPTIMIZATIONS --js_output_file=js/fornac.js src/*.js -closure-compiler/build/compiler.jar: +closure-compiler/build/compiler.jar: closure-compiler/* git submodule init closure-compiler git submodule update closure-compiler cd closure-compiler; ant jar diff --git a/css/fornac.css b/css/fornac.css index 670ef25..633f329 100644 --- a/css/fornac.css +++ b/css/fornac.css @@ -24,7 +24,7 @@ circle.outline_node { } circle.protein { - fill: blue; + fill: gray; fill-opacity: 0.5; stroke-width: 4; } diff --git a/src/fornaf.js b/src/fornaf.js index 5d41426..5d827b5 100644 --- a/src/fornaf.js +++ b/src/fornaf.js @@ -1116,17 +1116,25 @@ function FornaContainer(element, passedOptions) { link_lines.append("svg:title") .text(link_key); - link_lines.attr("class", "link") + link_lines + .classed("link", true) .attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { return d.target.x; }) .attr("y2", function(d) { return d.target.y; }) .attr("link_type", function(d) { return d.link_type; } ) + .attr("class", function(d) { return d3.select(this).attr('class') + " " + d.link_type; }) .attr('pointer-events', function(d) { if (d.link_type == 'fake') return 'none'; else return 'all';}); + all_links.attr('class', '') + .classed('link', true) + .attr("link_type", function(d) { return d.link_type; } ) + .attr("class", function(d) { return d3.select(this).attr('class') + " " + d.link_type; }) + all_links.exit().remove(); /* We don't need to update the positions of the stabilizing links */ + /* basepair_links = vis_links.selectAll("[link_type=basepair]"); basepair_links.classed("basepair", true); @@ -1138,7 +1146,7 @@ function FornaContainer(element, passedOptions) { plink = vis_links.selectAll("[link_type=protein_chain],[link_type=chain_chain]"); plink.classed("chain_chain", true); - + */ if (self.displayFakeLinks) xlink = all_links; @@ -1188,7 +1196,6 @@ function FornaContainer(element, passedOptions) { return node_tooltips[d.node_type]; }; - xlink.on('click', link_click); var circle_update = gnodes.select('circle'); diff --git a/src/simplernaplot.js b/src/simplernaplot.js index 208ffc2..2f88d2e 100644 --- a/src/simplernaplot.js +++ b/src/simplernaplot.js @@ -78,6 +78,7 @@ simple_xy_coordinates = function(pair_table) loop(k, l, pair_table); } } + polygon = Math.PI*(count-2)/count; /* bending angle in loop polygon */ remember[++r] = j; begin = i_old < 0 ? 0 : i_old; @@ -110,6 +111,5 @@ simple_xy_coordinates = function(pair_table) alpha += Math.PI-angle[i+1]; } - return poss; }