Skip to content

complete() should mark instance as completed prior to stop #7

Description

@hapticdata

Right now a call to instance.isCompleted() inside of a 'stop' handler would return false if invoked through instance.complete(). Should be marked as completed prior to event dispatch

const loop = new Animitter();
// will log out false
loop.on('stop', () => console.log(loop.isCompleted()));

loop.start();
// ...
loop.complete();

https://github.com/hapticdata/animitter/blob/master/index.js#L132-L137

user should be able to detect the loop was stopped from being completed from within a stop handler

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions