Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:pkerpedjiev/fornac into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Kerpedjiev committed Apr 14, 2015
2 parents 7213f33 + 3a37603 commit 0a42018
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion css/fornac.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ circle.outline_node {
}

circle.protein {
fill: blue;
fill: gray;
fill-opacity: 0.5;
stroke-width: 4;
}
Expand Down
13 changes: 10 additions & 3 deletions src/fornaf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/simplernaplot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -110,6 +111,5 @@ simple_xy_coordinates = function(pair_table)
alpha += Math.PI-angle[i+1];
}


return poss;
}

0 comments on commit 0a42018

Please sign in to comment.