react-d3-animation
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -49,2 +49,3 @@ 'use strict'; | ||
if (that.animateTimeout) clearTimeout(that.animateTimeout); | ||
if (that.animateInterval) clearInterval(that.animateInterval); | ||
@@ -67,14 +68,16 @@ | ||
this.animateInterval = setInterval(function () { | ||
frame++; | ||
this.animateTimeout = setTimeout(function () { | ||
that.animateInterval = setInterval(function () { | ||
frame++; | ||
var newState = {}; | ||
_lodash2['default'].forIn(filter, function (val, key) { | ||
newState[key] = that.interpolate[key](frame / time); | ||
}); | ||
var newState = {}; | ||
_lodash2['default'].forIn(filter, function (val, key) { | ||
newState[key] = that.interpolate[key](frame / time); | ||
}); | ||
updateState(newState); | ||
updateState(newState); | ||
if (frame >= time) clearInterval(that.animateInterval); | ||
}, 1000 / time); | ||
if (frame >= time) clearInterval(that.animateInterval); | ||
}, 1000 / time); | ||
}, delay); | ||
} | ||
@@ -81,0 +84,0 @@ }, { |
{ | ||
"name": "react-d3-animation", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "react-d3 animation", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -1,2 +0,2 @@ | ||
# react-d3-animate | ||
# react-d3-animation | ||
@@ -3,0 +3,0 @@ Animation component in react-d3. |
8584
125