Skip to content

Commit

Permalink
Modified the compare function to use the smallest event ID in cases w…
Browse files Browse the repository at this point in the history
…here the event start times were the same
  • Loading branch information
jmirmina committed Apr 30, 2013
1 parent 0405012 commit f23fd2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ function _exclEndDay(end, allDay) {


function segCmp(a, b) {
return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start);
tempCmp = (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start);
return (tempCmp === 0) ? (a.event.id - b.event.id) : tempCmp;
}


Expand Down

0 comments on commit f23fd2a

Please sign in to comment.