d3/d3-plugins — pull request #66 by enjalot (2013-06-11 05:56:41+00:00)
Title: d3.sticker plugin

this plugin lets you easily copy paste svg elements and manipulate them as d3 selections.

the primary advantage over a element is that you can modify the "sticker" in data driven ways by selecting it's child elements.

I believe it is also faster than the current elements which can be quite slow with only 100 of them in chrome.

one thing to note is that I use d3.select to append a node with a function, it seems to me that d3.append could easily enable appending by function (as well as passing in node) in this way. it would make it more natural to use the plugin by calling:

selection.append(sticker.node)
rather than
selection.select(sticker.node) as I currently do.