I need to resize and rotate certain elements in SVG document using javascript. The problem is, by default, it always applies the transform around the origin at (0, 0) – top left.
How can I re-define this transform anchor point?
I tried using the transform-origin attribute, but it does not affect anything.
This is how I did it:
svg.getDocumentById('someId').setAttribute('transform-origin', '75 240');
It does not seem to set the pivotal point to the point I specified although I can see in Firefox that the attribute is correctly set. I tried things like center bottom and 50% 100% with and without parenthesis. Nothing worked so far.
Can anyone help?