-
Notifications
You must be signed in to change notification settings - Fork 716
Support for leading (and trailing zeroes) #88
base: master
Are you sure you want to change the base?
Conversation
+1 |
Sweet |
Looks nice! Are there any reasons this isn't merged yet, @adamschwartz ? |
@mikaelhm The Can you please confirm and fix this? |
@julian-weinert it's been a while since i wrote this. can you paste the code you're using somewhere, and i can try to take a look at it. |
@barlindhaug haven’t had the chance to play with it. Plus I’ve mostly handled the CSS for the project. @zackbloom any thoughts? |
@adamschwartz Ok, I see. Thanks for getting back to me! |
@mikaelhm I see, it has been in loop for a while... I created a fiddle for you: https://jsfiddle.net/julian_weinert/55wv6vnL/3/ |
@julian-weinert, it does work. The problem in your jsfiddle is that when you use the class odometer on the span element, an odometer will automatically be created for your number, which has no To fix it rename the span class: Or disable the auto feature to off like this: window.odometerOptions = {
auto: false
} For more details see the docs: |
My fault, I should have seen this myself... |
👍 any reason this isn't merged yet? |
Don't think so. Not sure who can merge it.
|
Hey folks, It's really cool that you've made those changes to provide such a functionality. The issue revealed as wrong least digit behavior. The odometer somethimes shows "value+1" when stopped, also sometimes the dot appears in last digit position in the right bottom corner. More details can be found here #97 (example uses original code: http://jsfiddle.net/vdLe9y95/7/). I also made an offline example (http://nekaka.com/d/RFqOB8Sr2Q) that uses the odometer from this repo: https://github.com/mikaelhm/odometer. Look into those examples for a couple of minutes and you will see what I'm talking about. Sorry for offtopic, I can't post the issue to your forked repos, due to "issues" button disabled. Thanx in advance. |
@4xy you're right. There was a rounding error. I have now fixed it. |
+1 for this fix. Can we get this merged? :D |
Hey guys, any updates on when this can be merged? |
For all interested, please see #106 for a workaround. |
Works brilliantly! Thank you so much! |
No problem @saurabhj :) |
Thanks! It was very useful here. Works perfectly. |
Hey, If I kicked off a count up, then hide the div its contained in using fadeOut (effectively display none) and then fade it back in, the odometer is no longer counting up, but showing the final result. This is obviously with a high transition time. Is there a workout around to make it keep doing the count up after fadeOut? Thanks |
+1 for merging |
0.0X is not working. It will will 00X without decimal point. Can help? |
still no merge? |
Thanks so much for your compiled version! It works as a charm. |
Ok, first of all, thank you for the requested feature. This should have been merged by now. However, I think I have come across an issue. The decimal zeros do not animate when using "count" animation option. It only works on the slide option. Can test in the provided jsfiddle by the dev. Shoutout @mikaelhm |
continued on the work of @iogorodov ( he added trailing zeroes) by adding support for leading zeroes, through the option of setting minimal integer length.
This fixes #67 and #63.