-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show 1 instead of 0 for final second #20
Comments
+1 Would be great if this feature is added, seems like a common scenario when it's used as a count down timer. |
This is not a feature it is a bug in the code. I set it up as below with durations 12 so its the same as a clock. At 3 you should be 1/4 of the way around, and 6 1/2 the way around, 9 3/4 and at 12 or 0 the full way around, but below is what it looks like. It looks weird because it is wrong the text and the animation is i second ahead duration: 12 |
@liveaffiliates I get your point, but there could be different scenarios where a 0 needs to be shown. In the example you mentioned, even-though you've set the duration to be 12, it's actually 13 (extra 1 second for the 0). Therefore as OP mentioned, there should be an option where we could skip the 0 or add an offset. |
I just timed it with a stopwatch the timer is not even running for the correct amount of time |
Solved with pull request #35 , I personally had the same problem, and the solution I gave it was a bit more generic, allowing you to manually edit the text given a duration. timeFormatterFunction: (oldFormatterFunction, duration) {
if (duration.inSeconds == 0) {
return "GO";
} else {
return Function.apply(oldFormatterFunction, [duration]);
}
} Possible solution 2: Displace all the text one second with respect to the duration timeFormatterFunction: (_, duration) {
return '${duration.inSeconds + 1}';
} |
Kinda weird seeing a 0 on a countdown when there is technically 1 second remaining. Can there be a switch or an offset?
thanks
The text was updated successfully, but these errors were encountered: