Jakebogan Posted March 11, 2021 Share Posted March 11, 2021 I'm trying to figure out why my svg morph is going off the screen, I've tried messing with the translate and the viewbox but nothing seems to work. Any ideas how to get svg's to morph in the center? See the Pen oNYJxOB?editors=0010 by Wisemen221 (@Wisemen221) on CodePen Link to comment Share on other sites More sharing options...
Solution PointC Posted March 11, 2021 Solution Share Posted March 11, 2021 Hi @Jakebogan Welcome and thanks for being a Club member. That morph is behaving as I'd expect. You have some funky transforms on the group and a little bit of an odd viewBox size. Here's a fork of your pen showing the circle target and where it resides. I've outlined the SVG with red so you can see it better. See the Pen 01b4f32f5e6659d58d0d961600889795 by PointC (@PointC) on CodePen The secret to SVG vector prep is using a background rectangle the same size as your project. I have a whole post about that here. https://www.motiontricks.com/use-background-rectangle-with-svg-exports/ Hopefully that helps. Happy morphing. 2 Link to comment Share on other sites More sharing options...
Jakebogan Posted March 11, 2021 Author Share Posted March 11, 2021 Okay awesome, thanks for the advice and resources. I got it to work now! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now