Skip to content

[DOCS] Reset method is missing in the documentation page #736

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

Open
xJkit opened this issue Nov 17, 2020 · 0 comments
Open

[DOCS] Reset method is missing in the documentation page #736

xJkit opened this issue Nov 17, 2020 · 0 comments
Assignees

Comments

@xJkit
Copy link

xJkit commented Nov 17, 2020

I discovered the reset() instance method in source code as follows:

instance.reset = function() {
    const direction = instance.direction;
    instance.passThrough = false;
    instance.currentTime = 0;
    instance.progress = 0;
    instance.paused = true;
    instance.began = false;
    instance.loopBegan = false;
    instance.changeBegan = false;
    instance.completed = false;
    instance.changeCompleted = false;
    instance.reversePlayback = false;
    instance.reversed = direction === 'reverse';
    instance.remaining = instance.loop;
    children = instance.children;
    childrenLength = children.length;
    for (let i = childrenLength; i--;) instance.children[i].reset();
    if (instance.reversed && instance.loop !== true || (direction === 'alternate' && instance.loop === 1)) instance.remaining++;
    setAnimationsProgress(instance.reversed ? instance.duration : 0);
  }

However, I didn't see any information about the reset() in the documentation page: https://animejs.com/documentation/#TLcontrols

Is there any reason not to mention this function in the documentation?

Or maybe just miss it?

Thanks.

@juliangarnier juliangarnier self-assigned this Apr 18, 2025
@juliangarnier juliangarnier changed the title Reset method is missing in the documentation page [DOCS] Reset method is missing in the documentation page Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants