Jump to content
Search Community

Snap vertices of element

svetlana test
Moderator Tag

Recommended Posts

Hey svetlana and welcome to the GreenSock forums. Two things related to this:

  1. We recommend always using GSAP to set the transforms of elements that you're animating with GSAP. Not doing so is one of the most common GSAP mistakes.
  2. I would probably apply the transformation on elements that are not related to the snapping. So if you need to transform the container, create a wrapper element around it that you transform instead. If you need to transform the content (elements snapping), create an element that goes within the element that's getting snapped that you transform. 

Does that make sense?

  • Like 1
Link to comment
Share on other sites

21 hours ago, GreenSock said:

Or you could use your own custom snapping function to run whatever logic you want in there. If necessary, you could use the MotionPathPlugin.convertCoordinates() to convert coordinates. 

Thanks. MotionPathPlugin is amazing tool! I'll try it.

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...