wip
This commit is contained in:
1 parent
0586ecd2c3
commit
d3941c6a91
1 file changed
+5
-6
@@ -21,12 +21,11 @@ function animate(element, end, duration = 500, fixtotwo = false) {
|
|||||||
// Calculate current value and round to integer
|
// Calculate current value and round to integer
|
||||||
const currentCount = Math.round(end * easedProgress * 100) / 100;
|
const currentCount = Math.round(end * easedProgress * 100) / 100;
|
||||||
|
|
||||||
// if (fixtotwo) {
|
if (fixtotwo) {
|
||||||
// element.innerHTML = currentCount.toFixed(2);
|
element.innerHTML = currentCount.toFixed(2);
|
||||||
// } else {
|
} else {
|
||||||
// element.innerHTML = currentCount;
|
element.innerHTML = currentCount;
|
||||||
// }
|
}
|
||||||
element.innerHTML = currentCount.toFixed(2);
|
|
||||||
|
|
||||||
if (progress < 1) {
|
if (progress < 1) {
|
||||||
requestAnimationFrame(updateCount);
|
requestAnimationFrame(updateCount);
|
||||||
|
|||||||
Reference in new issue
Block a user