Capítulo 330 de 411

Chapter 330: ScrollToPlugin.config

Core Idea

Allows you to configure the global behavior of ScrollToPlugin like autoKill

Key Concepts

  • vars: Object

  • autoKill [Boolean] - if true, ScrollToPlugin will automatically sense if the scroll position was changed outside of itself (like if the user manually started dragging the scrollbar mid-tween) and cancel that portion of the tween.

Code Examples

ScrollToPlugin.config({ autoKill: true })
  • What it demonstrates: typical usage of ScrollToPlugin.config in a GSAP animation.

Key Takeaways

  1. vars: Object

  2. autoKill [Boolean] - if true, ScrollToPlugin will automatically sense if the scroll position was changed outside of itself (like…