azazdeaz / azazdeaz/react-gsap-enhancer
TweenMax delay is not honored when restart is called
- Dominant language
- JavaScript
- Stars
- 730
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I noticed that when I call restart on a TweenMax controller, the `.restart( includeDelay:Boolean, suppressEvents:Boolean ) : * `is not honored. This is my tweenmax function:
```
function animateTextDesign({ target }) {
return TweenMax.from(target.find({ id: 'textdesign' }), 6, { autoAlpha: 0, delay: 1.9 });
}
```
but when I call `this.animateDesign.restart(true, false);` the animation does restart but the delay is non-existent. Please let me know if you are experiencing the same issue or if I'm doing anything wrong. Or you could show me another way to restart the animation with the delay.
edit: There is another way I was able to restart the animation but it's pretty dirty. I would prefer if I could use the restart:
```
this.animateDesign.kill();
this.animateDesign = this.addAnimation(animateDesign);
```
Contributor guide
Research direction
No source file or test is named. Start by locating the TweenMax controller setup and the animateDesign example, then reproduce the restart(true, false) behavior with the 1.9-second delay. Done means restarting through restart preserves the configured delay, with coverage for the reported case if the project has relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100