Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- NEW: ScrollTrigger.config() method that lets you set a boolean "limitCallbacks" value like ScrollTrigger.config({ limitCallbacks: true }); Setting it to true causes ScrollTrigger to skip calling the onEnter/onLeave callbacks when the state isn't toggled, meaning if you scroll down past a ScrollTrigger on a page and then refresh the page, it won't call the "onEnter" unless it's actually in the viewport (well, between its start and end positions). - FIXED: if you create a ScrollTrigger AFTER initial load and it doesn't have any animation associated with it, it wouldn't trigger a refresh(), thus it wouldn't fire its onEnter (for example) if it's already on screen. See https://greensock.com/forums/topic/24459-reveal-animation-in-react-gatsby/ - FIXED: if you create a pinned ScrollTrigger element and then scroll ALL the way down on the page, then switch tabs and come back (or do anything that'd trigger a refresh()), it may incorrectly pin that element again when it shouldn't. See https://greensock.com/forums/topic/24467-scrolltrigger-pin-feature-issue - FIXED: regression in 3.3.0 could cause gsap.from() tweens to generate warnings in the console when immediateRender is set to false. See https://greensock.com/forums/topic/24519-warnings-in-console-while-using-gsapfrom-with-immediaterender-false/ - FIXED: the animation associated with a ScrollTrigger that does NOT have a scrub value may revert upon refresh() (which happens when the tab that was hidden becomes active again, so if you switch tabs and come back again, the animation could be reset). See https://greensock.com/forums/topic/24452-what-is-the-best-practice-of-tween-few-times-one-element-with-scrolltrigger/ - FIXED: if a page was loaded such that its scrollbar is already **past** a ScrollTrigger, that ScrollTrigger's onEnter wouldn't get triggered. Now there's a setting for that, ScrollTrigger.config({limitCallbacks: true}). This is handy because sometimes you don't want those callbacks to get triggered in that scenario. When ScrollTrigger originally launched it WOULD fire the onEnter regardless, but then we "fixed" that behavior so that it'd only fire when the scroll position is between the ScrollTrigger's start and end, but realized that wasn't entirely intuitive for everyone, so we switched the default behavior back to firing onEnter by default and allow you to disable that with ScrollTrigger.config({limitCallbacks: true}); - FIXED: if a ScrollTrigger was killed during the course of a refresh() (as could happen on initial load if you set once: true), it could cause some ScrollTriggers to skip their refresh() due to the index being shifted internally. See https://greensock.com/forums/topic/24412-scrolltriggerrefresh-help/
- Loading branch information