Jump to content
Search Community

Independent scaling between parent and child element

tganyan test
Moderator Tag

Recommended Posts

I'm having an issue where it's looking like I need to wrap my head around counter-scaling, but bottom line is I need to do a version of the linked codepen animation, but with the parent element ("#image-card-container") using scaleX and scaleY instead of width and height for the resizing. The reason for this is that, if you watch very closely, the animation has a slight shimmy as it resolves (becomes more egregious at larger sizes), and it seems to me the way to solve that is to use scale instead of width/height. The issue that creates, however, is it messes with the scaling of the child element in really weird ways and I'm not sure how to set it up to replicate this codepen behavior, but with the parent scaling instead of using width / height. I had a similar post around this several months back and was ultimately unsuccessful in getting a clear path forward; I'm hoping this time around I'm able to show the challenge/ask a bit more clearly and might have better luck.

See the Pen rNpdozL by tganyan (@tganyan) on CodePen

Link to comment
Share on other sites

This looks promising, thank you! It'll probably take me today and tomorrow to get the bandwidth to read up on this, but I'll make sure and update here to let you know where I land. Appreciate the speedy and friendly response (as always)!

Link to comment
Share on other sites

  • 2 weeks later...

I wanted to circle back around here and just update that @OSUblake pointed me in the right direction and it would appear exposcale is the answer to my challenges here. Still need to refine my usage of it, but I've seen enough of it in testing to feel pretty confident that it will work.

 

Thanks! (and sorry for the late response, work keeps me busy!)

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