juliangarnier / anime

JavaScript animation engine
https://animejs.com
MIT License
50.42k stars 3.68k forks source link

reset method in animations with duration 0 #730

Open rraya opened 4 years ago

rraya commented 4 years ago

Describe the bug reset() method seems not to work when the animation has been initialised with duration: 0

I'm not sure about if the problem is a bug or a misunderstanding from the documentation.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://codepen.io/rraya/pen/PozzKqW
  2. Move the cursor inside the red box
  3. Move the cursor outside the red box

Expected behavior The red box has been restored to its original position after step 3.

Additional context Don't pay attention to the example and its functionality. It's very silly and its goal is only to show the problem.

sadeghbarati commented 3 years ago

animejs use Promise to resolve complete animation

when there is no duration "It can't start, or it can't even end or complete"