jnhltmn Posted September 10, 2020 Share Posted September 10, 2020 It looks like I can't set 'autoRotate:true' as a default. Am I right of doing something wrong? var tl = gsap.timeline({ defaults: {autoRotate: true} } ); Link to comment Share on other sites More sharing options...
ZachSaucier Posted September 10, 2020 Share Posted September 10, 2020 Hey jnhltmn. You can't set defaults like that for plugin-specific values like MotionPathPlugin. Some plugins like ScrollTrigger have their own defaults functionality that you can use but MotionPathPlugin doesn't. However you could extend a pre-made object using regular JS to create your own defaults: See the Pen OJNvZPZ?editors=0010 by GreenSock (@GreenSock) on CodePen Note that IE doesn't support the above so you'd have to transpile it if you need to support IE still. 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