volls
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by volls
-
-
@mvaneijgen thanks very much for your reply. I would like the svg to remain stationary, and just the rect inside to contract and expand around its centre.
-
I have a simple svg with a rect box inside. I want to change the width of this rect in such a way that it changes from the centre of the rect, like a scaleX would work with transform-origin center. Currently, reducing the width contracts it from the right side. I need to change with width in order to maintain fidelity otherwise I'd use scale. Is there a way to get this to work? Would I have to play around with the x attribute? Thanks.
See the Pen yLVaXpy?editors=1000 by ritwikvd (@ritwikvd) on CodePen
Changing the width of an SVG rect
in GSAP
Posted
@mvaneijgen thanks! I essentially wanted to find out if there was a way to do this without having to manipulate the x attr. But I've been researching stuff thru out the day, and haven't found anything, so I think I'll just go with your solution for now. Thanks very much for your time.
@mikel Cheers! will look into that
@ZachSaucier will do!