I feel like I'm going crazy here. I've been staring and staring and must be missing something obvious.
I would like the curved path to be blue and the straight path underlying the word to be red.
I noticed that I'm always setting stroke-width, stroke, and fill so I made a helper method
lineColor = (color, node) ->
node
.attr 'stroke', color
.attr 'stroke-width', 2
.attr 'fill', 'none'
And draw the paths like this
#curvy
lineColor 'blue', svg
.append 'path'
.attr 'd', line indentations
and like this
#underline
lineColor 'red', svg
.append 'path'
.attr 'd', usageLine usageCol
you would think the first line would be blue and the second red, but they both come out red (or whatever color is used last)!
I don't get it, there's no delayed execution going on here, and if I put the stroke command on each node outside the function it works.
What am I missing?
Edit: Here's the same thing without the helper function - everything's working great.