Response title
This is preview!
var svg = $('#svgphone').svg('get');
var cx = eval($('#img', svg.root()).attr('width'))/2;
var cy = eval($('#img', svg.root()).attr('height'))/2;
r = 45;
var rr = r + ", " + cx + ", " + cy;
$('#img', svg.root()).attr('transform', 'rotate(' + rr + ')');
Now if I apply another attribute for scaling like this:
var svg = $('#svgphone').svg('get');
myScale = 101;
$('#img', svg.root()).attr('transform', 'scale(' + myScale + ')') ;
The previously applied attribute gets reset. Why?
svg.image(0, 0, 330, 540, 'images/img1.jpg', {id: 'img'}); svg.image(0, 0, 330, 540, 'images/iPhone5png.png', {id: 'imgphone'});
Why and how to solve this problem?
TIA
Yogi Yang
© 2013 jQuery Foundation
Sponsored by and others.