rc-animate
Advanced tools
Comparing version 1.0.5 to 1.1.0
@@ -79,6 +79,7 @@ 'use strict'; | ||
var exclusive = props.exclusive; | ||
var currentlyAnimatingKeys = this.currentlyAnimatingKeys; | ||
// last props children if exclusive | ||
// exclusive needs immediate response | ||
var currentChildren = exclusive ? (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)) : this.state.children; | ||
var newChildren = exclusive ? nextChildren : _ChildrenUtils2['default'].mergeChildren(currentChildren, nextChildren); | ||
var currentChildren = this.state.children; | ||
var newChildren = _ChildrenUtils2['default'].mergeChildren(currentChildren, nextChildren); | ||
@@ -94,20 +95,14 @@ if (showProp && !exclusive) { | ||
this.setState({ | ||
children: newChildren | ||
}); | ||
// exclusive needs immediate response | ||
if (exclusive) { | ||
currentChildren.forEach(function (c) { | ||
_this.stop(c.key); | ||
Object.keys(currentlyAnimatingKeys).forEach(function (key) { | ||
_this.stop(key); | ||
}); | ||
// make middle state children invalid | ||
// restore to last props children | ||
newChildren.forEach(function (c) { | ||
_this.stop(c.key); | ||
}); | ||
currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); | ||
} | ||
this.setState({ | ||
children: newChildren | ||
}); | ||
var currentlyAnimatingKeys = this.currentlyAnimatingKeys; | ||
nextChildren.forEach(function (c) { | ||
@@ -114,0 +109,0 @@ var key = c.key; |
{ | ||
"name": "rc-animate", | ||
"version": "1.0.5", | ||
"version": "1.1.0", | ||
"description": "css-transition ui component for react", | ||
@@ -48,3 +48,4 @@ "keywords": [ | ||
"rc-tools": "3.x", | ||
"react": "0.13.x" | ||
"react": "0.13.x", | ||
"velocity-animate": "~1.2.2" | ||
}, | ||
@@ -51,0 +52,0 @@ "precommit": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18444
9
386