Permalink
Browse files

'stop' fires for events with falsy duration (oneshot), fixes #3

  • Loading branch information...
adamrenklint committed Mar 10, 2015
1 parent 15f07f4 commit 10edc140ae746106c578d4d0f2cb8b37c5e1d71c
Showing with 2 additions and 0 deletions.
  1. +1 −0 README.md
  2. +1 −0 index.js
View
@@ -129,6 +129,7 @@ dilla.start();
- FIXED: ```step.position``` is incorrect [#1](https://github.com/adamrenklint/dilla/issues/1)
- **1.0.2**
- FIXED: ```dilla.getPositionWithOffset()``` returns incorrect position when offset is falsy [#5](https://github.com/adamrenklint/dilla/issues/5)
- FIXED: ```"stop"``` fires for events with falsy duration (oneshots) [#3](https://github.com/adamrenklint/dilla/issues/3)
## License
View
@@ -84,6 +84,7 @@ function emitStep (step) {
step.time = step.time + offset;
step.clockPosition = step.position;
step.position = step.event === 'start' ? step.args[0] : this.getPositionWithOffset(step.args[0], step.args[1]);
if (step.event === 'stop' && step.position === step.args[0]) return;
step.context = this.context;
this.emit('step', step);
}

0 comments on commit 10edc14

Please sign in to comment.