Jump to content
Search Community

transformOrigin position

kodralex test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

I'm trying to rotate an arrow from the bottom left (out of view) into view. I've attached a rough image with the direction of the rotation in red. I've been messing around with transformOrigin for some time now and can't get it right. I've read through the docs on the Mozilla site to try and better understand transformOrigin position, but alas, I need a little help.

 

rotate.png.4627dacea0a4fb1bd0d7dc3900699b6c.png

See the Pen rNQezjv by alexkodr (@alexkodr) on CodePen

Link to comment
Share on other sites

  • Solution

I find dev tools pretty handy to figure out this sort of thing, easier to tweak and replay and scrub through slowly until you find the right combo - also adding a little outline so you can see where the shape's boundary box is.

If you have a specific question, feel free to ask!

See the Pen GRwZyyo?editors=0010 by GreenSock (@GreenSock) on CodePen

  • Like 3
Link to comment
Share on other sites

Thanks, Cassie. Really helpful. I had it in a regular environment and then moved to Codepen to test it quicker, but dev tools are a much better approach. The added option of being able to replay and scrub quicker. Thanks for your time and help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...