Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
V.prototype.transform = function fun(matrix, opt) {
const node = this.node;
if (V.isUndefined(matrix)) {
return (node.parentNode)
? this.getTransformToElement(node.parentNode)
: node.getScreenCTM();
}
if (opt && opt.absolute) {
return this.attr('transform', V.matrixToTransformString(matrix));
}
const svgTransform = V.createSVGTransform(matrix);
node.transform.baseVal.appendItem(svgTransform);
return this;
};