Jump to content
Search Community

smoothOrigin usage

Pilatus test
Moderator Tag

Go to solution Solved by GreenSock,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello,

 

I was using the smoothOrigin feature but it appears to be working in a different way than the intended one, or maybe just the way I interpret it  :).

Basically I scale an element forth and back and it jumps, wasn't it supposed to not jump by default?

It jumps when I scale back to 1 and it doesn't when I scale to 2.

 

Please have a look at the demo.

 

See the Pen JdppeL by anon (@anon) on CodePen

Link to comment
Share on other sites

  • Solution

smoothOrigin is only for elements inside SVG, like <rect>, <path>, <polygon>, etc. Not the actual <svg> element itself which is considered a "normal" DOM element. You were animating the <svg> container/canvas itself. See what I mean? If you tried animating the <path> that you've got in there, smoothOrigin should work great.  

  • Like 3
Link to comment
Share on other sites

Not really - we're waiting to see how much of a demand there is, and how "smoothly" things go on the SVG side of things first (couldn't resist the pun). Not sure it's a wise change to make on typical DOM elements at this point, especially because it could break legacy projects. But if we get tons of requests, we'll definitely consider it. 

  • Like 2
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...