I am using <g transform = "rotate(45, 10, 30)">
in svg
to roate som circles and texts around a point at the same time, however, I want to keep orientation of each individual font the same (e.g., always facing one direction while the text is moved/rotated).
For example,how could I change the labels such as "A" in the right-side image to correct orientation after rotation?
How should I do that?
Thanks!
Instead of rotation of
<g>roup
and reverse rotation of the text within it, try this alternate grouping. Center the<g>
aroundorigin(0,0)
with negativex=
andy=
values & userotate(degree, 0, 0)
oncircle_group
, thentranslate(x,y)
on themain_group
.Edit: Here's an animated example, modified from this source. The trick is to move it around the origin with sin() and cos() trigonometric functions.