Using an SVG I am trying to rotate it by 30 degrees and then translate that horizontally 100. The issue is that when I rotate the coordinate system, it is rotated and so when I try to translate I will be translating the object along the rotated x-axis which is now at 30 degrees to the horizontal.
Is there any way to translate horizontally after rotation?
<g transform="rotate(30 50 50) translate(100 0)">
<rect x="0" y="0" fill="blue" width="100" height="100" />
</g>
I want to create control buttons for rotate and translate up, down, left, right. These will create a string which will use data binding to the transform property of the svg and so transform the object sequentially. But the translations need to be relative to the viewport not how the object has been rotated.
I am using the vue.js framework for the data binding.
I also do not want to use css.
Thanks,