Extract Element From Transformed Parent

Attach the parent's transform to the extracted element. This example removes an element from a transformed <g> and attaches the g's transform to the extracted element. This uses getCTM and createSVGTransformFromMatrix to merge a matrix transform to the extracted element.
Scenerio:
Both the circle and rect are currently within a transformed <g>. The rect will be removed from the g element, but maintain the same transform as within its parent g container. Note: The rect also has a transform.


SVG Source:
Javascript:
OK in:IE11/CH32/FF23