Releases: inorganik/countUp.js
Releases ยท inorganik/countUp.js
2.8.0
Added onStartCallback
option, useful for when scroll spy is enabled, thanks to @cherrol !
2.7.0
Reverted change which made "main" in package.json point to the module file, instead of the umd file. It now points again at the umd file.
2.6.2
When revamping the build, I tried to resolve a rollup warning that had been occurring on the build for a long time:
"(!) `this` has been rewritten to `undefined`
It occurs because of typescript's Object.assign polyfill, which uses this
on the global scope. If you set context: 'window'
in the rollup config, it will silence the warning, but it will cause issues if CountUp is not run in the browser. Allowing rollup to rewrite this to undefined on just the global scope is harmless and doesn't break anything, so I reverted the change.
2.6.1
This release doesn't change the CountUp code at all, just the distribution files - The requestAnimationFrame polyfill is no longer bundled with CountUp but served separately. The other files in dist remain the same. More details in the PR: #311
2.6.0
Support animation plugins: A plugin is a class instance or object passed in options for the plugin
param that implements a render method:
export declare interface CountUpPlugin {
render(elem: HTMLElement, formatted: string): void;
}
The plugin's render method will be called on each frame to display the formatted value instead of CountUp's.
v2.5.0
Added new option, onCompleteCallback
which gets called when the animation completes. You can still pass a callback to the start method, and it will override whatever is passed in the options.
2.4.2
Make it so when scroll spy is enabled, and scrollSpyOnce
is false, CountUp will re-animate when scrolling up, as well as down, thanks to @paidge
2.4.1
- Added Indian separators option
useIndianSeparators
which will format a number like "1,00,000" instead of "100,000"
- Added null check in
printValue
method to potentially fix react issue
2.3.2
Fixes #287 which was a bug where, when using smart easing and counting down, the animation would take longer than configured. It also fixed an issue which caused 2 easing cycles to run for the same scenario.
2.3.1
Fix window check for SSR, thanks to @johakr