Skip to content

Commit

Permalink
fix a bug mike created with his color stuff that made all the prettif…
Browse files Browse the repository at this point in the history
…ications fail.
  • Loading branch information
Daniel Thornton committed Apr 28, 2012
1 parent a4f3b9f commit a930aac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/js/reductions.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ var Reduction = Class.extend({
var i, j; // iterator
var e; // element
var n; // node
var pw; // proto-wire
var nodes = [], ignore_nodes = []; // node array
var index; // integers
console.log("prettify_collision");
Expand All @@ -88,10 +89,12 @@ var Reduction = Class.extend({
for (i = 0; i < self.board.nodes.length; i++) {
n = self.board.nodes[i];
if (ignore_nodes.indexOf(n) == -1) {
if ((new ProtoWire(undefined, a, b)).hit_test(n.x, n.y)) {
if ((pw = new ProtoWire(self.board, a, b)).hit_test(n.x, n.y)) {
pw.remove();
console.log("node collision detected");
return true;
}
pw.remove();
}
}

Expand Down

0 comments on commit a930aac

Please sign in to comment.