Using svg.js I am able to import a fragment from an existing svg file and add it to the dom. However I am not able to then manipulate that element using svg.js. Here is my code.
$.get('img/sprite.svg', function (doc) {
var figure = $(doc).find('g#figure')[0];
var figureHTML = figure.outerHTML;
var added = draw.svg(figureHTML);
added.transform({rotate: 90});
});
Here is the link to the docs for importing http://svgjs.dev/importing-exporting/ and the links for transforming http://svgjs.dev/manipulating/transforms/ I can't get any transformations to work on the imported element.