I am using Snap Svg Animator (https://github.com/cjgammon/SnapSVG-Animator), that uses Snap SVG internally.
I am able to transform the created SVG with the following command:
comp.mc.el.transform('translate(100,190)');
But I am not able to make the following work:
comp.mc.el.attr('{viewBox:0, 0, 300, 500}');
//also tried removing quotation
comp.mc.el.attr({viewBox:0, 0, 300, 500});
References: snap svg : change viewBox using parameters
I want to scale the svg. But the output doesnot reflect the change.