react-simple-animate
Advanced tools
Comparing version 1.5.3 to 1.5.4-beta.1
@@ -17,2 +17,4 @@ 'use strict'; | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -25,3 +27,4 @@ | ||
var defaultState = { | ||
animationWillEnd: false | ||
animationWillEnd: false, | ||
animationWillStart: false | ||
}; | ||
@@ -47,5 +50,5 @@ | ||
_this.animationTimeout = setTimeout(function () { | ||
_this.setState({ | ||
_this.setState(_defineProperty({ | ||
animationWillEnd: true | ||
}); | ||
}, 'animationWillEnd', false)); | ||
}, parseFloat(durationSeconds) * 1000); | ||
@@ -82,3 +85,9 @@ }, _temp), _possibleConstructorReturn(_this, _ret); | ||
if (!!delaySeconds) { | ||
this.setAnimationDelay(!!delaySeconds && startAnimation, delaySeconds); | ||
if (!startAnimation) { | ||
this.setState({ | ||
animationWillEnd: true | ||
}); | ||
} | ||
this.setAnimationDelay(!!delaySeconds, delaySeconds); | ||
} | ||
@@ -131,3 +140,5 @@ | ||
if (animationWillEnd || startAnimation && !delaySeconds) { | ||
if (animationWillEnd && !startAnimation && delaySeconds) { | ||
style = endStyle; | ||
} else if (animationWillEnd || startAnimation && !delaySeconds) { | ||
if (onCompleteStyle) { | ||
@@ -134,0 +145,0 @@ style = onCompleteStyle; |
{ | ||
"name": "react-simple-animate", | ||
"version": "1.5.3", | ||
"version": "1.5.4-beta.1", | ||
"description": "react simple animate", | ||
"main": "lib/animate.js", | ||
"keywords": [ | ||
"react", | ||
"animate" | ||
], | ||
"keywords": ["react", "animate"], | ||
"scripts": { | ||
@@ -11,0 +8,0 @@ "clean": "rimraf lib/", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
22117
136
2