Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialStefan Hoffmann
24,811 PointsRotating and Scaling SVG - Firefox and transform origin does not work as expected
I am here right now:
And I have found an issue using transform-origin with firefox.
It does not seem to apply.
I started out a codepen to try it out: http://codepen.io/stho/pen/OVZBpZ
Load it up in chrome, and it will work as expected. Load it up in firefox, and it will not.
I am aware of some stackoverflow response to that question that says, one should redraw the svg so its center point is 0,0 . But I asked myself if there is a more elegant way? After all, if these are icons from the treehouse patch you guys already have the answer around, don't you?
Best regards, Stefan
1 Answer
Stefan Hoffmann
24,811 PointsI don't know how to say this, but thanks, thats actually the question that is answered with the next video, isn't it :).
Thanks!
Gari Merrifield
9,598 PointsGari Merrifield
9,598 PointsIt used to work in Chrome.... I just found that with Chromium 64.0, I was getting the same results as Firefox, so using the cx, cy values at pixel offsets seems to fix the centering.