cotag / orbicular

A CSS based circular progress bar for AngularJS
MIT License
47 stars 15 forks source link

Possible bug with 50% value #4

Closed y-lohse closed 10 years ago

y-lohse commented 10 years ago

Hi, and thanks, orbicular works pretty well. I did however encounter a bug using it in chrome canary (35), but lack the time to produce a smaller test case. I thought I'd drop a line here anyway.

When moving clockwise, if I pause at 50% and wait for the transition to complete before moving on to say 55%, nextHalf stays at false and the second half of the progress is hidden. However if I pause at 45%, step to 50% and immediately step to 55% without waiting for the transition to complete, it works fine.

i fixed it altering lines 104 and 111 as follow :

if (newValue >= 180 && !scope.nextHalf) {
//...
} else if (newValue < 180 && scope.nextHalf) {

if it's confirmed and you want me to, i can submit a pull request.

Cheers and thanks again, Yannick

stakach commented 10 years ago

I wrote a test to confirm. Thanks for the solution! Creating a new release now