Very cool! I was lazily working on something similar for a project, and might be able to drop this in and save a ton of time.
If the author reads this, might I suggest some examples using the label attributes of nodes and edges? It'd be great to see a graph annotated (potentially with some image or link tags embedded for further browsing?).