Implemented on the front page of Directed Edge
minor nitpick (and that's from someone that doesn't have as much js under his belt as you do, so please feel free to ignore)
Your bracketing style has one risk, if you should ever drop a complete line before a code block it will still be valid. That has bitten me once. Nowadays with version control such mistakes are a lot easier to spot though. Old habits die hard :)
Pretty code, really I'm going to have a good look at it later because this is roughly the kind of thing I had in mind while I was searching for a tree visualizer.