Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- NEW: ScrollTrigger.sort() method. You should generally create your ScrollTriggers in the order they'd happen on the page (top-to-bottom or left-to-right), but if that's not possible you can use ScrollTrigger.sort() to either use your own custom method for sorting or if none is provided, it'll sort by "refreshPriority" first, then by each ScrollTrigger's "start" value. So, for example, a ScrollTrigger with refreshPriority: 1 will get refreshed earlier than one with refreshPriority: 0 (the default). You're welcome to use negative numbers too. - NEW: each media query function in the object passed to ScrollTrigger.matchMedia() can now [optionally] return a function which will be called when the media query becomes inactive, so it's a great place to put cleanup code. - IMPROVED: you can now make multiple calls to ScrollTrigger.matchMedia() with the same media query string(s). It's generally not useful/necessary, but in some component-based environments it can be quite handy. - IMPROVED: if you set once: true on a ScrollTrigger that has a scrub value, it will honor that and only scrub once to completion. - FIXED: the "float" CSS property of a ScrollTrigger-pinned element wasn't copied to the pin-spacer. - FIXED: added missing TypeScript definition for MotionPathPlugin.cacheRawPathMeasurements(). See #396 - FIXED: a regression in ScrollTrigger's invalidateOnRefresh: true prevented it from working properly in some cases. See https://greensock.com/forums/topic/24765-multiple-scrolltriggers-in-multiple-each-functions-jquery/?tab=comments#comment-118817 - FIXED: if you disable() a ScrollTrigger that has a pinned element, its measurements may still inadvertently affect other ScrollTriggers that have the SAME pin element (very rare). - FIXED: if a ScrollTrigger was disabled, later when it gets re-enabled it may revert to the previous scroll position (not generally desirable). - FIXED: if you pin the same element multiple times, but at least one of those times it was NOT the "trigger", it could throw off the start/end calculations. See https://greensock.com/forums/topic/24811-pining-multiple-elements/ - FIXED: if there were multiple ScrollTriggers back-to-back that pin the same element, when you scroll backwards it may appear "stuck" in certain situations. - FIXED: under certain conditions, a paused animation that was scrubbed may act as though invalidate() kept getting called on it (basically it wouldn't init while paused). - FIXED: if you define a "render" function in a MorphSVGPlugin tween, it was interpreted as a function-based value (thus it would get called for each target and the RESULT of that function was used).
- Loading branch information