Skip to content

Instantly share code, notes, and snippets.

  1. General Background and Overview
@jcdcodes
jcdcodes / README.md
Last active March 2, 2016 14:25 — forked from mbostock/.block
Arc-and-Hands Tween Clock

Forked from mbostock's Arc Tween Clock example.

The first thing I learned with this is that .selectAll() takes a CSS selector as its argument. When dealing with multiple copies of the same element, like the arcs and the red lines here (which are both svg:path elements), if you want to use transitions and separate styling then one must apply class or id attributes or something so that the CSS selectors for the two sets of transitions can be mutually independent.

The second thing is that I learned is that I hate code that puns. False punning I can stand (though the commentary below points out what I think is a false punning bug I fixed), but I'm not smart enough and/or don't have the energy to deal with three or four separate simultaneous meanings of "path" and "line" that all need to be kept in mind when reading and writing the same small chunk of code. I've been known to do this kind of thing in the past, particularly when writing [Grails](http://grails.o