Capítulo 354 de 411
Allows you to configure certain global behaviors of ScrollTrigger like limitCallbacks
true, ScrollTrigger will only fire callbacks (onEnter, onLeave, onEnterBack, onLeaveBack) when the active state is toggled. For example, if you have a grid of 100 elements that each have a ScrollTrigger associated with them, and only 10 are on the screen at any given time and then you scroll down so that only boxes 50 - 60 are showing and reload the page, limitCallbacks: true would skip the onEnter for elements 1-49. The default limitCallbacks value is false meaning that the onEnter for elements 1-60 would all fire in this scenario.visibilitychange (when the browser tab changes from hidden to visible), you could set autoRefreshEvents: "DOMContentLoaded,load,resize". (added in 3.6.0)ScrollTrigger.config({syncInterval: 999999999 });.true, vertical resizes (of 25% of the viewport height) on touch-only devices won't trigger a ScrollTrigger.refresh(), avoiding the jumps that can happen when the start/end values are recalculated. Beware that if you skip the refresh(), the start/end trigger positions may be inaccurate but in many scenarios that's preferable to the visual jumps that occur due to the new start/end positions. (added in version 3.10.0)// only fire callbacks when the active state toggles
ScrollTrigger.config({
limitCallbacks: true,
ignoreMobileResize: true,
});
true, ScrollTrigger will only fire callbacks (onEnter, onLeave, onEnterBack, onLeaveBack) when the…true, vertical resizes (of 25% of the viewport height) on touch-only devices won't trigger a…