mhemesath/r2d3 — pull request #115 by marciocaraballo (2013-07-29 19:16:30+00:00)
Title: Fix issue #49

Addressing issue #91

I built an example on a repository using the fixed version of r2d3 for this issue, since I'm having some problems with jsffidle and jsbin.

Example :

https://github.com/marciocaraballo/r2d3example/

if (before && r2D3Element.domNode.tagName !== 'g') {
r2D3Element.raphaelNode.insertBefore(before.raphaelNode);
}

Adding that check in insertBefore solves the problem, since new ticks add 'g' elements, and they have raphaelNode = null.