Skip to content

Tags: vebin/GSAP

Tags

3.10.4

Toggle 3.10.4's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.10.4

- IMPROVED: DrawSVGPlugin only warns once now when you use vector-effect="non-scaling-stroke" and scale something non-proportionally. See https://greensock.com/forums/topic/31881-warning-drawsvgplugin-and-vector-effect-property-in-safari-chrome-and-firefox/

- IMPROVED: a ScrollTrigger.refresh() will now force a ScrollSmoother's wrapper element's scrollTop to 0 in order to work around an edge case where the browser automatically set it due to a hash in the URL for example. See https://greensock.com/forums/topic/31897-scroll-to-different-page/#comment-159550

- IMPROVED: forced scroll-behavior to "auto" on <body>/<html> to override Bootstrap's "smooth" that it adds (and breaks things).

- IMPROVED: worked around iOS bugs that cause the frame rate to appear to drop in half while touch-scrolling on iOS with ScrollSmoother (only while finger is on screen).

- FIXED: regression in 3.10.3 caused ScrollSmoother effects not to work properly if you scroll down on a page and then resize the viewport

- FIXED: if you ScrollTrigger.normalizeScroll(true) and then ScrollTrigger.normalizeScroll(false), it could cause touch-scrolling not to work properly on some mobile devices.

- FIXED: when pinning elements with ScrollTrigger using transforms rather than position: fixed, if you're animating the y position of the pinned element itself it could throw an error.

- FIXED: on initial page load, if the page was scrolled down, ScrollSmoother may render the page at the top.

- FIXED: when ScrollTrigger.normalizeScroll() is applied on a page that does NOT have the initial scale set to 1 like <meta name="viewport" content="width=device-width, initial-scale=1">, touch-scrolling may move at the wrong speed.

- FIXED: if you ScrollTrigger.normalizeScroll({ type: "pointer,wheel" }) and then drag on the scrollbar in the browser, it may not update ScrollSmoother's position.

3.10.3

Toggle 3.10.3's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.10.3

- NEW: ScrollSmoother now has a static .refresh() and instance-level .refresh() methods as a convenience (identical to ScrollTrigger.refresh() and smoother.scrollTrigger.refresh() but we found those weren't as intuitive).

- IMPROVED: Observer will trigger an onMove when an onDrag occurs (rather than prioritizing the onDrag over onMove)

- IMPROVED: if you set paused(true) on a ScrollSmoother, it'll now allow wheel scrolling on things other than the body (like modals). See https://greensock.com/forums/topic/31685-scrollsmoother-and-modal/

- IMPROVED: if you forget to add a wrapper element for ScrollSmoother and it automatically generates one for you and then you (or your framework) call ScrollSmoother.create() AGAIN, it'll find that first wrapper that was auto-generated and reuse that instead of creating another one. See https://greensock.com/forums/topic/31790-scroll-smoother-with-swup/

- FIXED: input elements like <input>, <select>, etc. will now get focus properly when you tap on them on a mobile device when normalizeScroll is enabled.

- FIXED: if you paused(true) a ScrollSmoother, buttons may not respond to clicks.

- FIXED: when a ScrollSmoother's .offset() was called, the target element would always end up with a transform (even if it was translate(0,0)). It wouldn't visually change anything, but the mere fact that it had a transform could have negative effects like creating a new container boundary.

- FIXED: ScrollSmoother.scrollTo(...) may (in one particular situation) scroll smoothly even if you set the smooth parameter to false.

- FIXED: if you disable() an Observer WHILE dragging, it didn't may continue firing onDrag events until released.

- FIXED: if you kill() a ScrollSmoother, it didn't reset the height of the <body> to "auto". See https://greensock.com/forums/topic/31639-scrollsmoother-refresh-after-routing/

- FIXED: pinning could be thrown off if the window gets resized after scrolling (regression in 3.10.0). See https://greensock.com/forums/topic/31699-scrolltrigger-pin-breaks-on-page-rsize/

- FIXED: a regression in 3.10.0 could cause snapping not to work properly after resize in some scenarios. See https://greensock.com/forums/topic/31633-cannot-get-scrollsmoother-to-work-with-scrolltrigger-snapping/

- FIXED: if you try animating an SVG <mask> on a motion path, it would throw an error because <mask> elements don't have a way to get local bounding box coordinates like .getBBox().

- FIXED: if you enable ignoreMobileResize in ScrollTrigger/ScrollSmoother, it may not trigger a refresh when the user changes their mobile device's orientation.

3.10.2

Toggle 3.10.2's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.10.2

- IMPROVED: you can call a ScrollSmoother's .effects() method and omit the config object if you want it to just pull from the data attributes.

- FIXED: ScrollSmoother could show a warning in the console in browsers that don't support overscroll-behavior (like Safari).

- FIXED: if you load ScrollTrigger or Observer AFTER you load GSAP in the <head> (all loaded BEFORE the <body> exists), it would throw an error. See https://greensock.com/forums/topic/31624-cannot-load-register-scrolltrigger-3100-or-3101/

3.10.1

Toggle 3.10.1's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.10.1

- IMPROVED: you can add a scrollSpeed multiplier to an Observer which is very useful if you want to invert the direction (scrollSpeed: -1)

- FIXED: TypeScript definition file fixes, like Observer and ScrollSmoother needed to be added to the index.d.ts file. See https://greensock.com/forums/topic/31596-typescript-eslint-question/

- FIXED: if you define a function-based "momentum" in ScrollTrigger.normalizeScroll({ momentum: self => {...} }) it wouldn't work properly (only numbers worked, not function-based values).

- FIXED: default for the "type" of Observer is "wheel,touch,pointer" ("scroll" is not included anymore by default because it's better to opt-in due to the fact that drag-srolling could cause directional confusion).

3.10.0

Toggle 3.10.0's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.10.0

- NEW: Brand new ScrollSmoother plugin for doing smooth scrolling based on native scroll (for "Shockingly Green" and above Club GreenSock members). https://greensock.com/scrollsmoother

- NEW: gsap.quickTo() for an optimized function that redirects an animation of a particular property to a new end value, like for mouse followers. https://greensock.com/docs/v3/GSAP/gsap.quickTo()

- NEW: ScrollTrigger.normalizeScroll() that normalizes scroll across devices and handles it on the JS thread in order to keep things synchronized and prevent [most] mobile browsers from hiding/showing the address bar, overscroll bounce behavior, etc. https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.normalizeScroll()

- NEW: ScrollTrigger.config({ ignoreMobileResize: true }) causes ScrollTrigger to skip the ScrollTrigger.refresh() on touch-only devices when the address bar shows/hides to avoid the jump that could happen due to the start/end positions shifting. See https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.config()

- NEW: Observer plugin (and matching ScrollTrigger.observe() method) for a super-flexible, unified way to sense meaningful events across all (touch/mouse/pointer) devices without wrestling with all the implementation details. Perhaps you want to respond to "scroll-like" user behavior which could be a mouse wheel spin, finger swipe on a touch device, a scrollbar drag, or a pointer press & drag...and of course you need directional data and velocity. See https://greensock.com/docs/v3/Plugins/Observer

- NEW: ScrollTrigger.isTouch read-only static property that lets you discern if the device is pointer/mouse only (0), touch-only (1), or touch -and- pointer/mouse (2)

- NEW: added support for *= and /= relative prefixes (so now you can do += | -= | *= | /=). See https://greensock.com/forums/topic/30851-simple-way-to-change-property-by-a-factor-relative-value

- NEW: ScrollTrigger instances have a new tweenTo() method for gradually tweening to a particular scroll position (and automatically interrupting if the user tries to scroll).

- NEW: ScrollTrigger.scrollerProxy() recognizes a new "content" property which basically tells ScrollTrigger where to put the marker elements if you don't want them in the scroller (like if you've got a nested element in the scroller that should house the markers).

- NEW: A new static ScrollTrigger.disable() method allows you to disable the ALL of the ScrollTrigger functionality and remove internal listeners which can be useful if you're using a framework that handles routing and you're only using ScrollTrigger on one page for example. There's also a ScrollTrigger.enable() method. See greensock#485

- NEW: new rtl: true option added to TextPlugin to make the text come in from right-to-left

- NEW: you can set autoRevert: true on a .from() tween to have it record the initial (pre-"from") values and return to those if/when it is rendered at/before the start (like if the parent playhead goes backward before the start)

- NEW: ScrollTrigger has an onKill callback

- NEW: gsap.ticker.add() accepts two new parameters: once (to have the callback only fire once), and prioritize (to make it run before all other listeners currently in the queue, meaning before the GSAP global timeline updates). So gsap.ticker.add(callback, once, prioritize)

- IMPROVED: the algorithm that plots a smooth curve through points in MotionPathPlugin has been improved to avoid kinks that arose at certain angles. This affects the "curviness" functionality as well, so you may need to tweak that value. See https://greensock.com/forums/topic/30835-how-to-resolve-sharp-curves/ and https://greensock.com/forums/topic/22777-gsap-3-replacement-for-bezierpluginbezierthrough/

- IMPROVED: if you have snapping applied to a ScrollTrigger, it will now keep that snapped value when refreshing/resizing.

- IMPROVED: gsap.utils.getUnit() is more accurate/flexible with complex values.

- IMPROVED: there's an unofficial BackgroundSizePlugin that lets you animate to/from "cover" or "contain" and/or scale: https://codepen.io/GreenSock/pen/rNYxENg

- IMPROVED: in a Flip.from() call with prune: true, "entering" elements are protected from pruning

- IMPROVED: ScrollTrigger got some minor speed improvements.

- IMPROVED: ScrollTrigger's preventOverlaps feature now only affects trailing ScrollTriggers that are not technically overlapping in terms of start/end trigger positions. See greensock#497

- FIXED: if you alter the totalTime() of a tween that has a repeat, and the new totalTime() is an exact multiple of the duration (thus the "time" remains unchanged), it wouldn't update the totalTime.

- FIXED: if you define an onRefreshInit on a ScrollTrigger and manually call .refresh() on a particular instance, it didn't call the onRefreshInit() in that particular case (it would only happen right before ALL ScrollTriggers are refreshed, like on ScrollTrigger.refresh()).

- FIXED: an extremely rare edge case could cause MotionPathPlugin not to map the position correctly when using very high-precision values in "start" or "end". See https://greensock.com/forums/topic/30603-possible-bug-in-motionpathplugin/

- FIXED: .from() tweens associated with ScrollTriggers that are already beyond the start when the page loads may not render correctly in certain situations (regression in the core since 3.9.0). See https://greensock.com/forums/topic/30635-potential-regression-380-391-when-using-from-and-scrolltrigger/

- FIXED: if you set a delayed scrub value on a ScrollTrigger AND once: true, it now allows the scrub to complete rather than killing it immediately (which could leave the animation partially done).

- FIXED: if you alter the timeScale() of a child animation of a timeline, it may not update the totalDuration() of that timeline until a render. See greensock#488

- FIXED: if you set a numeric scrub value on a ScrollTrigger that has a containerAnimation, it could appear frozen until the containerAnimation stopped. See https://greensock.com/forums/topic/30724-rotation-on-scroll/

- FIXED: regression in 3.9.1 could cause .fromTo() animations of colors not to return to their original state when rewound to (or past) the beginning. See https://greensock.com/forums/topic/30750-scrolltrigger-issue-scrub-does-not-return-to-original-state/

- FIXED: if you alter the timeScale of the parent timeline from within a child's onComplete that's at the VERY end of the timeline and change the playhead position (like restart()), it may not work. See https://greensock.com/forums/topic/30818-timescale-change-to-timeline/

- FIXED: if you set preventOverlaps on a ScrollTrigger that did NOT have scrub and it had no toggleAction on the "leave" event slot, it didn't trigger the completion when scrolling quickly past.

- FIXED: if you set invalidateOnRefresh on a ScrollTrigger that doesn't have a scrub set, ScrollTrigger.refresh() could cause the animation to re-run (like on resize). See https://greensock.com/forums/topic/31008-chrome-navigation-disappearing-causing-animation-to-reset-android

- FIXED: in a rare situation, snapping in ScrollTrigger would go to the wrong spot.

- FIXED: if you have an animation-based ScrollTrigger with once: true set and you refresh the page when it's scrolled PAST that trigger's end and there are other ScrollTriggers that pin elements before that one, it could throw an error (extremely rare). See https://greensock.com/forums/topic/31179-cannot-read-properties-of-undefined/

- FIXED: regression since 3.6.0 could cause a tween of a CSS variable that's a complex value like "70% 0%, 100% 0%, 100% 100%, 70% 100%" to only animate the first numeric value. See https://greensock.com/forums/topic/31200-animating-clip-path-polygon/

- FIXED: TypeScript definition for ScrollTrigger's start/end needed a slight tweak (add the parameter). See greensock#493

- FIXED: xPercent or yPercent weren't always cleared with clearProps or ScrollTrigger.matchMedia(). See https://greensock.com/forums/topic/31311-matchmedia-is-is-weird/

- FIXED: gsap.config({ trialWarn: false }) still allowed the warning to be shown in the console if the config() call happened more than 50ms after the trial plugin loaded. Not anymore.

3.9.1

Toggle 3.9.1's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.9.1

- FIXED: if you do a .fromTo() and the "from" part has a numeric value (no unit) that does NOT have a default unit defined in gsap.config({units:{}}), it wouldn't get added automatically. Now it uses the unit from the current value in that case.

- IMPROVED: Flip's "absolute" feature works better now with grid. It also assigns an explicit width/height to targets that aren't included in the "absolute" ones in order to prevent collapsing.

3.9.0

Toggle 3.9.0's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.9.0

- NEW: Flip Plugin and CustomEase are now in the public downloads! They're no longer available only to Club GreenSock members. Merry Christmas! Please be sure to get the proper "Business Green" commercial license if you're collecting a fee from multiple users. See https://greensock.com/licensing for details.

- NEW: percent-based keyframe syntax, like keyframes: { "0%": {...}, "50%": {...}, "100%": {...} } that acts very similar to CSS keyframes

- NEW: Array-based keyframes syntax that lets you animate through various values in sequence, like keyframes: { x: [0, 100, 80, 95, 90], y: [100, 0, 10, 5] }

- NEW: Entirely new Flip.batch() functionality for advanced FLIP animations that need to synchronize their steps like getState(), setState(), animate(), etc.

- NEW: Flip.killFlipsOf(targets, complete) lets you feed in targets and it'll kill any Flip plugin-based animations of those targets.

- NEW: FlipState objects have new methods like .add(otherState) for merging in new data, .compare(otherState) to determine which elements are changed/unchanged/entering/leaving, and clear()

- NEW: Flip's "absolute" value was previously boolean, but now you can also pass in an Array of targets or selector text to specify a subset of the flipping elements that should get set to position: absolute.

- NEW: Flip recognizes a new absoluteOnLeave: true property that'll result in just the elements that are fed to onLeave() to be set to position: absolute which simplifies exit animations.

- NEW: ScrollTrigger instances have a .labelToScroll() method that converts a label in a timeline into the associated scroll position so that you could, for example, perform a scrollTo tween to that spot or jump there. See https://greensock.com/forums/topic/29670-scroll-to-label-with-scrolltrigger/?tab=comments#comment-149550

- IMPROVED: if you do a Flip animation with nested: true and a toggleClass, it will apply that class during the calculations so that it'll accommodate certain layout changes made by the application of that class.

- IMPROVED: Flip will overrule max-width/max-height/min-width/min-height values during non-scale Flip animations.

- IMPROVED: if you define a toggleClass on a Flip.from() animation, it'll be applied to all the targets (even if they're in the onLeave/onEnter elements)

- IMPROVED: if you set gsap.config({nullTargetWarn: false}) it will also affect ScrollTrigger triggers/pins

- FIXED: ScrollTriggers that have a containerAnimation value didn't update for the first time until the containerAnimation updated, so in some scenarios it could cause a jump (if the trigger elements were already on-screen horizontally, but out of view vertically)

- FIXED: MotionPaths that have an "end" that exceeds 1 weren't calculating it properly (regression in 3.6.0). See https://greensock.com/forums/topic/29643-motionpath-doesnt-end-at-desired-value/

- FIXED: if a ScrollTrigger has a pinnedContainer and the page is refreshed after being scrolled down past the point of pinning, the start/end calculations for that ScrollTrigger could drift.

- FIXED: if you use end: "max" on a ScrollTrigger and a subsequent instance pushed the maximum scrollable area larger due to pinning, it's now corrected (pushed further down accordingly).

- FIXED: gsap.utils.distribute() may slightly miscalculate the return value if you use from: "start" | "end" | "center" (the range used was about 0.5 off).

- FIXED: calling .kill() on the same ScrollTrigger (or its timeline) more than once could inadvertently remove a different ScrollTrigger from the internal list of ScrollTriggers. See https://greensock.com/forums/topic/29973-scrolltrigger-erroneously-killed-when-killing-an-unrelated-timeline-scrolltrigger/

- FIXED: sometimes A ScrollTrigger animation's progress in the snapping onComplete didn't quite reflect the scroll position because some browsers lag in dispatching the "scroll" event. See https://greensock.com/forums/topic/30004-scrolltrigger-labels-onsnapcomplete/

- FIXED: if you pin an element that has a flex-basis that's not auto or a negative "order", it may not pin correctly. See https://greensock.com/forums/topic/30060-pinning-and-flexbox/

- FIXED: if you attempt to rewind an animation to a point BEFORE 0 (its start) and it hadn't rendered once yet, it may skip the render.

- FIXED: Draggable's bounds might be 1px off in some rare cases when using an element for the bounds. See https://greensock.com/forums/topic/30161-bounds-changed-after-being-zoomed-inout-scale/

- FIXED: a tween's duration may not get updated correctly in a very rare situation: immediateRender is set to true on a .to() that's in a timeline, and the tween has its duration CHANGED by a plugin/instantiation.

- FIXED: if you set a transformPerspective value in the "from" part of a .fromTo() without any unit (like "px"), it could cause the transforms not to be set correctly.

- FIXED: regression in GSDevTools 3.8.0 could cause it not to work properly or show the ids in the drop-down list. See https://greensock.com/forums/topic/28706-gsdevtools-animation-ids-not-working/

- FIXED: if you apply a TextPlugin animation in a .from() with BOTH an "oldClass" and "newClass" defined, it wouldn't work properly. See https://greensock.com/forums/topic/30337-textplugin-issue-with-from-and-oldclass/

- FIXED: if you use an ampersand right next to text in a TextPlugin tween, the browser could render it incorrectly. See https://greensock.com/forums/topic/30380-textplugin-issue-with-ampersand/

- FIXED: in some rare edge cases, Flip might miscalculate the positioning of nested elements (when their width/height didn't change, but they're inside transformed elements that did in fact change their visible width/height)

- FIXED: worked around an edge case where Flip resizing/repositioning might temporarily introduce a scrollbar that throws off the position calculations due to the scrollbar (which is never seen).

3.8.0

Toggle 3.8.0's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.8.0

- NEW: ScrollTrigger recognizes a new "containerAnimation" configuration property for when the trigger element is being "scrolled" into view by a linear Tween of its container, like when vertical scrolling causes elements to move **horizontally** into view. You could think of it like a nested ScrollTrigger.

- NEW: ScrollTrigger recognizes a new "preventOverlaps" configuration property that forces all trailing ScrollTrigger animations to their end state when the ScrollTrigger is about to affect its own animation (like in a toggleAction)

- NEW: ScrollTrigger recognizes a new "fastScrollEnd" configuration property that will automatically force the associated animation to completion if the scroll velocity exceeds 2500px/second (or whatever you define) when it LEAVES the active area (so onLeave or onLeaveBack). This helps avoid overlapping animations when the user scrolls quickly.

- NEW: ScrollTrigger.isInViewport() method that lets you determine if a particular element is in the viewport. You can even define a certain proportion, like if at least 20% of it is in the viewport like ScrollTrigger.isInViewport(element, 0.2);

- NEW: ScrollTrigger.positionInViewport() method that lets you get a normalized value representing an element's position in the viewport. For example, if the center of myElement is 80% down from the top of the viewport, ScrollTrigger.positionInViewport(myElement, "center") would return 0.8.

- NEW: ScrollTrigger instances have new .previous() and .next() methods that return the ScrollTrigger that's immediately before or after (in the refresh order) which makes it simple to build function-based start/end values that are dependent on the previous one, like start: self => self.previous() ? self.previous().end : "top top"

- NEW: ScrollTrigger snapping is now directional by default (except snap: "labels" because there's already a snap: "labelsDirectional" option) because that is what's most intuitive in the vast majority of situations. To prevent the directional part, you can set directional: false in the snap object, like snap: {snapTo: 1 / 5, directional: false}

- NEW: ScrollTrigger.snapDirectional() is a utility method that you can give a snapping increment **OR** an Array of numbers and it will return a function that you can use to do directional snapping. For example, let snap = ScrollTrigger.snapDirectional(5) returns a function that'll snap in increments of 5 in the direction provided where 1 is positive and -1 is negative, so snap(11, 1) would return 15 whereas snap(11, -1) would return 10.

- NEW: if you return a GSAP animation (Tween/Timeline) from an onEnter/onLeave/onEnterBack/onLeaveBack/onToggle callback, it will be set as the callbackAnimation property, effectively maintaining a reference to the most recent one which will cause it to be affected by preventOverlaps and fastScrollEnd behaviors.

- NEW: ScrollTrigger.clearScrollMemory() erases any recorded scroll positions (this is almost never needed, but just in case...)

- NEW: ScrollTrigger recognizes a new "pinSpacer" property that allows you to specify an element that should be used as the spacer instead of the default behavior where ScrollTrigger creates a DIV element internally. The main reason this is useful is if you're loading an iframe into the pinned element because on resize, the browser would refresh that content due to the fact that ScrollTrigger must remove/add the spacer element as a part of its ScrollTrigger.refresh() calculations.

- NEW: TextPlugin lets you set preserveSpaces: true in order to maintain extra spaces, swapping in &nbsp; to make them show up in HTML. See https://greensock.com/forums/topic/29060-textplugin-and-format-preservation/

- IMPROVED: in some browsers, a pinType of "transform" could appear to jump/vibrate while scrolling. It's impossible to completely eliminate all of that due to the fact that most modern browsers handle scrolling on a separate thread, thus repainting isn't synchronized but 3.8.0 forces updates more frequently while scrolling to minimize that jitter. See https://greensock.com/forums/topic/29205-scrolltrigger-wobbly-pinning/

- IMPROVED: if you misspell selector text in a ScrollTrigger (like trigger: "#oopps"), you'll see a console.warn() message for easier troubleshooting. See greensock#472

- IMPROVED: TypeScript definition files cover gsap-trial package and "snap" property. See https://greensock.com/forums/topic/28966-how-to-snap-in-gsapto/

- IMPROVED: if a ScrollTrigger's start value is numeric, it will be treated as absolute and won't be pushed further down when you pin the same element multiple times. See https://greensock.com/forums/topic/28845-scrolltrigger-long-scroller-with-multiple-animation-triggers/

- IMPROVED: if you animate a CSS value to a value with a % unit and then reverse all the way back to the beginning, it won't  revert to the equivalent px value (which is what the browser reported as the computed value). So % is maintained.

- IMPROVED: if ScrollTrigger.refresh() is called in an environment where the document/window/body doesn't exist yet, it won't throw an error. See greensock#415

- IMPROVED: PixiPlugin warns if you haven't registered the PIXI object.

- FIXED: if you refresh() a ScrollTrigger inside of a callback after the page has already been scrolled, it may remember that scroll position longer than it should in some rare scenarios.

- FIXED: if you use a "random(...)" value in the "from" part of a .fromTo() animation on a CSS-related value, it wasn't applied properly. See https://greensock.com/forums/topic/28817-random-not-working-in-fromto/

- FIXED: if the <path/> you use for a motionPath contains data that has no commas or spaces between values like 126.87-32.48-310.91-58-499 instead of 126.87,-32.48,-310.91,-58,-499, it may not be aligned correctly. See https://greensock.com/forums/topic/28827-what-am-i-doing-wrong-motionpathplugin/ and https://greensock.com/forums/topic/29031-my-motion-path-needs-offsets-but-why/

- FIXED: if you create a getProperty() getter function and then try passing in a unit, it would always return a number instead of including that unit.

- FIXED: if you set overwrite: "auto" and then before the tween's first render, you alter the progress (like tween.progress(1)), it may not properly overwite conflicting tweens in certain circumstances.

- FIXED: when you .kill() a ScrollTrigger that has a numeric scrub value (or the associated animation), it didn't kill() the scrub tween, thus it wasn't made available for garbage collection. See https://greensock.com/forums/topic/29002-memory-leak-in-scrolltrigger-scrub/?

- FIXED: in very rare circumstances, an addPause() callback may fire more than once.

- FIXED: worked around Firefox bug that could throw an error if matrix values are needed from an SVG that has no width or height

- FIXED: regression in MotionPathPlugin 3.7.1 could cause the final value in a MotionPath animation to be incorrect. See https://greensock.com/forums/topic/29097-motion-path-on-complete-sets-position-to-x0-and-y-0/

- FIXED: GSDevTools didn't recognize if you set the time() of the selected animation to a non-zero value. See https://greensock.com/forums/topic/29113-force-gsdevtools-to-start-at-a-given-timeline-time/

- FIXED: if you .kill() a GSDevTools instance and then attempt to create a new one, the keyboard events may not be listened to correctly. See https://greensock.com/forums/topic/29129-killed-gsdevtools-forgets-to-clean-its-event-listeners/

- FIXED: regression in 3.7.0 caused keyframe animations not to inherit a default duration (or other defaults). See https://greensock.com/forums/topic/29180-keyframes-does-not-work-in-version-371/

- FIXED: if you use gsap.utils.snap() with a number greater than 1 but also has a decimal, it would always eliminate the decimal.

- FIXED: if you have an inline border-top-* style on the <body></body>, ScrollTrigger may eliminate it upon instantiation. It would only happen if it's more specific than "border-top", like "border-top-width for example.

- FIXED: Flip plugin may not properly factor in the page's scroll into the positioning properly under certain circumstances when the element is position: fixed. See https://greensock.com/forums/topic/29343-scrolltrigger-flip-to-fixed-position/ and https://greensock.com/forums/topic/29368-flip-plugin-error-state-position/

- FIXED: regression in 3.7.1 could cause MotionPathPlugin not to properly align a root <svg></svg> element on a path if it has a viewBox attribute with non-zero x/y values.

- FIXED: if you set a liveSnap on a Draggable AND bounds, the bounds may not be respected (only the liveSnap).

- FIXED: if you place a callback on a timeline with a ScrollTrigger that is set to scrub: true and then scroll down on a page past where that callback is and then refresh the browser, the callback may not be triggered. See https://greensock.com/forums/topic/29456-scrolltrigger-seemingly-inconsistently-updates-timeline-calls/

- FIXED: in Draggable, if you use an Array for snap on multiple values like snap: { x: [0], y: [0] }, it would skip all but the first one (in terms of snapping). See https://greensock.com/forums/topic/29466-draggable-snap-only-affecting-x-value/

- FIXED: in Draggable, if you tap (click) on certain mobile devices and the browser refreshed at a slow enough speed, it was possible that the onClick would fire twice. See https://greensock.com/forums/topic/29530-pointerup-fired-for-draggables-onclick-in-mobile-view

- FIXED: if you change the timeScale() of an animation AFTER adding it to a timeline that has smoothChildTiming: false, it may not render at the correct time when the parent is played in reverse

3.7.1

Toggle 3.7.1's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.7.1

- IMPROVED: made the "wheel" event listener passive in ScrollTrigger. See greensock#460

- IMPROVED: made it possible to use CustomEase without loading GSAP.

- IMPROVED: function-based inertia "end" values now receive the velocity as the 2nd parameter which makes it much easier to do directional snapping

- IMPROVED: if you alter the repeatDelay() after the animation has already started, it maintains the playhead's local position as long as the parent timeline has smoothChildTiming enabled.

- FIXED: if you call .update() with the "sticky" parameter true while dragging after the element has been changed in the document flow (repositioned), it may render at the incorrect position.

- FIXED: if you kill() a ScrollTrigger instance, the previous scroll position may still be remembered. So, for example, in a SPA that goes to a new page and kills all the ScrollTriggers, it may still keep the scroll position instead of going back to the top/left. See https://greensock.com/forums/topic/28592-scrolltrigger-and-nextjs-scroll-position-after-route-change/ and https://greensock.com/forums/topic/28575-scrolltrigger-issue-with-scroll-position-when-i-navigate-to-a-page/

- FIXED: if ScrollTrigger.update() was called during a ScrollTrigger.refresh(), it could cause pinned elements not to be positioned correctly. See https://greensock.com/forums/topic/28547-having-an-issue-with-scrolltrigger-locomotive-scroll/

- FIXED: worked around a Firefox bug that could throw an error if you tried to Flip a root <svg> element. Firefox reports getCTM() as null on <svg> elements.

- FIXED: improved Flip plugin's ability to correctly size root <svg> elements

- FIXED: regression in 3.7.0 caused a tween's onStart callback to be called twice. See https://greensock.com/forums/topic/28644-370-onstart-in-fromto-fires-twice/

- FIXED: if you define a "snap" value for ScrollTrigger as an Array in the shorthand syntax, like snap: [0, 0.1, 0.7, 1] instead of snap: {snapTo: [0, 0.1, 0.7, 1]}, it didn't work properly.

- FIXED: if you resume a tween whose playhead is at the VERY end, it could render one last time unnecessarily, calling the onComplete when it really shouldn't because the playhead didn't move.

- FIXED: regression in GSDevTools.create() caused it not to display all animations with "id" properties in the drop-down list. See https://greensock.com/forums/topic/28706-gsdevtools-animation-ids-not-working/

- FIXED: an edge case could cause MotionPathPlugin could use a large amount of memory. See https://greensock.com/forums/topic/28744-multiple-gsap-motion-path-traces-on-the-same-timeline-simultaneously/

3.7.0

Toggle 3.7.0's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.7.0

- NEW: percentage-based position parameter options for timelines - A value like "-=25%" would overlap by 25% of the inserting animation's totalDuration, or "<25%" would insert it 25% into the previous animation. See docs for details. Related: greensock#444

- NEW: gsap.utils.selector() returns a selector function that's scoped to a particular element (or React ref or Angular ElementRef) - no need to create a ref for each and every element you want to animate, for example!

- NEW: gsap.utils.toArray() accepts an optional 2nd parameter, the Element on which .querySelectorAll() should be called (the scope) if selector text is passed in. Like gsap.utils.toArray(".box", myElement)  will find all the descendant elements of myElement with the class of "box".

- NEW: added getTween() method to ScrollTrigger that allows you to get the scrub tween (default) or the snapping tween (getTween(true)).

- NEW: ScrollTrigger.scrollerProxy() recognizes a fixedMarkers: true option that'll prevent it from moving the scroller markers. It can be useful in setups like described at greensock#452

- NEW: ScrollTrigger recognizes a new pinnedContainer property which allows you to specify an ancestor element that gets pinned which would affect the positioning of the start/end values. For example, if the parent element gets pinned for 300px, the start/end values of a ScrollTrigger on that child element should be pushed down by 300px. See https://greensock.com/forums/topic/28255-scrolltrigger-not-delaying-within-pinned-element/

- NEW: MotionPathPlugin recognizes a new "fromCurrent" boolean value that, when false, causes it NOT to include the current property values in an Array that's passed in for the "path". For example, if the target is currently at x: 0, y: 0 and then you do a motionPath: {path: [{x: 100, y: 100}, {x: 200, y: 0}, {x: 300, y: 200}]} tween, by default it would add {x: 0, y: 0} to the start of that Array so that it animates smoothly from wherever it currently is but now you can set fromCurrent: false to avoid that and just have it jump to x: 100, y: 100 at the start of that tween. See https://greensock.com/forums/topic/28421-motionpathplugin-option-to-not-add-current-targets-position-to-the-start-of-the-path-array/

- NEW: Helper function added to the docs that can deliver onReverse() functionality plus much more. It's called trackDirection(). See https://greensock.com/docs/v3/HelperFunctions#onReverse. Related to greensock#144 (comment)

- IMPROVED: Flip plugin has better support for SVG elements (it was created for regular DOM elements)

- IMPROVED: better support for special characters inside string-based "random(...)" values. See https://greensock.com/forums/topic/28077-using-special-symbols-and-characters-in-gsap-text/

- IMPROVED: if you enable() a ScrollTrigger (after it was disabled), it now resets itself by default rather than factoring in the previous position. So, for example, if its progress was 1 when it was disabled, and then you scroll the page all the way up and enable() it, it previously would fire its onEnterBack and onLeaveBack callbacks but now it doesn't. You can control this behavior with the new reset parameter of the enable() method.

- IMPROVED: better support in ScrollTrigger for CSS grid properties on pinned elements

- IMPROVED: ScrollToPlugin will sense if a scroll-snap-type is set on the target and if so, it will set it to "none" during the scrollTo animation, and then re-apply it at the end. See https://greensock.com/forums/topic/26181-scroll-snap-and-scrolltoplugin-not-playing-nice-togehter/

- IMPROVED: 2 extra decimal places of precision for generic tweens in order to add extra smoothing to ScrollTrigger scrubbing of very long timelines, for example. See https://greensock.com/forums/topic/28148-scrolltrigger-and-lottie-animation-flickering-problem/

- IMPROVED: TypeScript definition fixes and enhancements

- IMPROVED: for Draggables of type:"rotation", cursor changes are enabled

- IMPROVED: you can stagger keyframe tweens

- FIXED: if you animate a non-CSS property on a DOM element (like "innerHTML") with a .fromTo(), the "from" portion may not be pulled directly from that vars object. See https://greensock.com/forums/topic/27644-fromto-starting-from-0-instead-of-passed-value-when-1000/

- FIXED: .from() scrambleText animations with a starting value of "" didn't work properly.

- FIXED: ScrollTrigger.saveStyles() could cause inline CSS styles to stay reverted (like for from() tweens) when ScrollTrigger.refresh() was triggered aside from a "matchMedia" event. See https://greensock.com/forums/topic/25944-problem-with-scrolltriggersavestyles-and-scrolltriggermatchmedia

- FIXED: a timeline's iteration() could return an incorrect value if called from inside its own onRepeat callback. See https://greensock.com/forums/topic/27643-timeline-repeat-iteration-vs-standalone-tween-repeat-iteration/

- FIXED: a ScrambleTextPlugin from() tween could seem to have a gap at the beginning caused by an internal ease.

- FIXED: if you have a stagger applied to a ScrollTrigger animation that's a .fromTo() or .from(), it may not render it in the initial state before reaching the start scroll position (regression in 3.6.0). See https://greensock.com/forums/topic/27664-gsap-3-timeline-stagger-with-immediaterender-not-working/

- FIXED: if you didn't define an "animation" for GSDevTools (meaning it uses the globalTimeline), and then select another animation in the drop-down UI that has a delay, it wouldn't isolate that animation properly. See https://greensock.com/forums/topic/27690-question-about-dynamic-tweens-and-gsdevtools/

- FIXED: if you put a non-scrubbing scrollTrigger on a tween that has a delay and a stagger, it could skip the delay. See https://greensock.com/forums/topic/25610-problem-delay-property-not-working-with-srolltrigger/

- FIXED: if you tried using a modifier for a CSS variable, it didn't work. See https://greensock.com/forums/topic/27793-modifiers-with-vars/

- FIXED: the "restart" toggleAction of ScrollTrigger now factors in any delay value that was specified in the tween/timeline.

- FIXED: if you called ScrollTrigger.update() from inside an onUpdate callback on an immediately-rendering tween that has a ScrollTrigger, it could throw an error.

- FIXED: if a MotionPathHelper's tween had a target that started at non-zero x/y values, those offsets weren't factored in (so the editable path wouldn't match up with where it should be).

- FIXED: a regression in 3.6.1 could cause repeatRefresh on a timeline not to work properly in one particular case. See https://greensock.com/forums/topic/28031-gsap-361-timeline-issue/

- FIXED: if you use a snap duration on a ScrollTrigger that's shorter than the scrub duration, it could lead to odd results. See https://greensock.com/forums/topic/28112-using-scrolltrigger-w-fixed-position-sections/

- FIXED: in extreme cases, inertia in snapping could cause ScrollTrigger to scroll past the maximum or minimum, consequently restarting the snap. Overall, cleaned up several aspects of snapping in ScrollTrigger.

- FIXED: if you don't specify an animation for GSDevTools, it could fire callbacks of the animations when the page loads initially (and then again at the proper times). See https://greensock.com/forums/topic/19465-timelines-oncomplete-callback-fired-twice-when-gsdevtools-added/?tab=comments#comment-137962

- FIXED: if you create ScrollTriggers in a .matchMedia() and then resize to where all ScrollTriggers are removed, and then go back to a size where it creates the ScrollTriggers again, it could return to the scroll position from that initial state (before all ScrollTriggers were removed). See https://greensock.com/forums/topic/28114-scrolltrigger-does-not-revert-elements-to-their-original-values-on-resize/?tab=comments#comment-138731

- FIXED: onComplete didn't fire in a zero-duration timeline. See greensock#448

- FIXED: when you set markers: true on a ScrollTrigger that uses a scroller with position: fixed, it won't change it to position: relative. See greensock#452

- FIXED: if you gsap.getProperty(svgElement, "transformOrigin"), it would always return 0px 0px 0px for SVG elements.

- FIXED: if you cause the tween to render at a different time from INSIDE its onStart callback, it would still render at the original time.

- FIXED: if ScrollTrigger.update() was called from within a refresh handler, it could result in skipping the refresh() on some of the ScrollTriggers under certain conditions.

- FIXED: if you tried to render a .from() or .fromTo() tween at a negative time value (like rewinding it past the start), it may render the initial values rather than reverting.

- FIXED: if you try to set() an empty string value (""), it could be interpreted as "0". And if you use "=" as the second character in a string, it may not work correctly because it's interpreted as a relative value prefix, like "+=" or "-=". See https://greensock.com/forums/topic/28257-set-empty-strings/

- FIXED: if you animate to an invalid scale, like NaN, it wouldn't default to 0 and the transforms wouldn't render properly (because of that invalid value). See greensock#453

- FIXED: if you timeline.tweenFromTo() an immediately alter its progress(), it may not render at the appropriate time.

- FIXED: if you use Draggable for a position: fixed element that has movement limited to one direction, on Android it may not drag properly. See https://greensock.com/forums/topic/28357-draggable-android-issue-with-position-fixed/

- FIXED: timeline.recent() may return the incorrect child immediately after a .fromTo()