Files
Chart.js/src/core/core.animation.js
Ben McCann 4a8a7ee824 Use ES6 classes for elements (#6702)
* Use ES6 classes for elements

* Add additional elements
2019-11-07 19:51:26 -05:00

25 lines
705 B
JavaScript

'use strict';
const Element = require('./core.element');
const helpers = require('../helpers/index');
class Animation extends Element {
constructor(props) {
super({
chart: null, // the animation associated chart instance
currentStep: 0, // the current animation step
numSteps: 60, // default number of steps
easing: '', // the easing to use for this animation
render: null, // render function used by the animation service
onAnimationProgress: null, // user specified callback to fire on each step of the animation
onAnimationComplete: null, // user specified callback to fire when the animation finishes
});
helpers.extend(this, props);
}
}
module.exports = Animation;