Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
4644e5cecc |
|||
|
e35a30a606 | ||
|
81ec7122ea |
1 changed files with 3 additions and 0 deletions
|
@ -61,6 +61,9 @@ export class AnimatedNumberComponent implements OnChanges, AfterViewInit {
|
||||||
this.countUp = new CountUp(this.numberElement.nativeElement, this.value, {
|
this.countUp = new CountUp(this.numberElement.nativeElement, this.value, {
|
||||||
startVal: this.previousValue,
|
startVal: this.previousValue,
|
||||||
duration: this.duration,
|
duration: this.duration,
|
||||||
|
decimalPlaces: 2,
|
||||||
|
useEasing: true,
|
||||||
|
useGrouping: false,
|
||||||
easingFn: (t, b, c, d) => {
|
easingFn: (t, b, c, d) => {
|
||||||
if (this.ease === 'power1.out') {
|
if (this.ease === 'power1.out') {
|
||||||
return c * (1 - Math.pow(1 - t / d, 1)) + b;
|
return c * (1 - Math.pow(1 - t / d, 1)) + b;
|
||||||
|
|
Reference in a new issue