Permalink
Browse files

Refacor the god-awful code.

  • Loading branch information...
1 parent c7a40e3 commit 5778872512fa21435d5db05850e6f13e47b0a28b Matt Farmer committed Apr 5, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 g.line.js
View
@@ -162,7 +162,11 @@
}
}
- (Raphael.is(sym, "array") ? sym[j] : sym) && symset.push(paper[Raphael.is(sym, "array") ? sym[j] : sym](X, Y, (opts.width || 2) * 3).attr({ fill: fillcolor, stroke: "none" }));
+ if (Raphael.is(sym, "array") && sym[j] || ! Raphael.is(sym, "array") && sym) {
+ var symbol = Raphael.is(sym, "array") ? sym[j] : sym;
+
+ symset.push(paper[symbol](X, Y, (opts.width || 2) * 3).attr({ fill: fillcolor, stroke: "none" }));
+ }
if (opts.smooth) {
if (j && j != jj - 1) {

0 comments on commit 5778872

Please sign in to comment.