paulrosen/abcjs — pull request #26 by sbeal (2014-12-30 23:07:35+00:00)
Title: Correct order of timing events for animation

In `ABCJS.startAnimation()`, the `makeSortedArray()` function sorts the event hash by time, but it doesn't account for the scenario where a note can precede a bar with the same time value in the original unsorted array. In this scenario, because the time difference is 0, the note will precede the bar, which causes problems for the animation (in my experience, ABCJS believes the measure before the bar to contain an extra note which should actually be in the measure after the bar). To solve this, I've added a few lines to check whether the time difference is 0, and if it is, to make sure the bar comes first.