Skip to content

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

@hapticdata

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions