Skip to content

Commit

Permalink
fix(animation): Fix issue with wrong calculation of duration
Browse files Browse the repository at this point in the history
Since animateProperty has been overriden, I forgot to rewrite duration calcucation based on strings,
not the numbers
  • Loading branch information
ghaiklor committed Jun 29, 2016
1 parent 934f827 commit a49b39c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Print.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export default class Print extends Animation {
* @param {Object} options Options object
* @param {Object} options.shape Shape where property is need to be animated
* @param {String} options.property Property name that need to be animated
* @param {Number} options.startValue Start value for animation
* @param {Number} options.endValue End value for animation
* @param {String} options.startValue Start value for animation
* @param {String} options.endValue End value for animation
* @param {Number} [options.byValue] Step value for easing, by default it calculates automatically
* @param {Number} [options.duration] Duration of the animation in ms, by default it takes from Animation options
* @param {String} [options.easing] Easing that need to apply to animation, by default it takes from Animation options
Expand All @@ -57,7 +57,7 @@ export default class Print extends Animation {
const byValue = options.byValue || (endValue.length - startValue.length);
const duration = options.duration || this.getDuration();
const easing = options.easing || this.getEasing();
const delay = duration / (endValue - startValue);
const delay = duration / (endValue.length - startValue.length);
const start = Date.now();
const end = start + duration;
const tick = resolve => {
Expand Down

0 comments on commit a49b39c

Please sign in to comment.