Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delayedCall can take params of any type but is currently restricted to strings #338

Closed
wants to merge 1 commit into from

Conversation

sotnight
Copy link

@sotnight sotnight commented Dec 4, 2019

Updated typings. delayedCall can take params of any type but is currently restricted to strings. Changed that so that the parameters are of type any.

…ntly restricted to strings. Changed that so that the parameters are of type any.
@OSUblake
Copy link
Member

OSUblake commented Dec 4, 2019

This has already been addressed in the next release.

@naranjamecanica
Copy link

In the current version 3.3.0 the definition doesn't allow any parameter anymore.

I get the following error in my delay wrapper:

src/delay/delay.ts:13:46 - error TS2554: Expected 2 arguments, but got 3.

return gsap.delayedCall(_delay, _callback, _params);

the definition is now:

 function delayedCall(delay: number, callback: Function): core.Tween; 

and should be something like:

 function delayedCall(delay: number, callback: Function, params: unkown[]): core.Tween; 

jackdoyle added a commit that referenced this pull request Jun 5, 2020
- NEW: ScrollTrigger.batch() method that eliminates the need for something like IntersectionObserver in cases where you want to stagger the animations of elements as they enter the viewport.

- NEW: ScrollTrigger now recognizes an onRefreshInit callback which can be useful in advanced situations where you want to reset positioning of elements just for the calculation of the start/end. If you return a gsap.set() call (or any GSAP animation, but it really only makes sense to do a gsap.set()), it'll actaully revert it automatically when the refresh finishes!

- NEW: Any "refreshInit" listener can [optionally] return a gsap.set() call that'll get reverted as soon as the refresh finishes. Super useful for resetting positions just for the refresh() measurements.

- IMPROVED: ScrollTrigger is now compatible with Internet Explorer and it no longer relies on the "name" being implicity defined. This also fixes some problems that occured in bundlers. See #385 (comment)

- FIXED: if you refresh a page after scrolling down, ScrollTrigger may call the onEnter for everything ABOVE that position (including triggers that are off-screen). Now it only fires the onEnter for triggers that are truly inbetween their start and end positions.

- FIXED: here were a few TypeScript definition file problems. See #383 and #338

- FIXED: Various problems with ScrollTrigger not updating or refreshing properly in certain edge cases.

- FIXED: in some rare cases, an error could be thrown by Draggable or MotionPathPlugin if you tried animating/dragging an element with an ancestor element that has been interacted with by GSAP but NOT related to transforms. See https://greensock.com/forums/topic/24318-nuxtjs-draggable-error-cacherendertransform-is-not-a-function/

- FIXED: if a nested tween gets overwritten INSIDE a stagger tween, it now adjusts the duration of that parent tween when appropriate. For example, if the last staggered tween gets killed, it should shorten the duration of the parent tween.
@ZachSaucier
Copy link
Member

This has been fixed and can be closed @jackdoyle.

@jackdoyle jackdoyle closed this Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants