diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d7366c..def6efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### v1.2.2 (2017-04-19): + +Adds `interruptBehavior` prop to `VelocityComponent`. (Thanks, @Robinfr!) + +Changes to remove warnings in React 15.5 will come shortly in v1.3. + ### v1.2.1 (2017-01-19): This is a minor version bump that updates the version of babel to the latest (v6). diff --git a/README.md b/README.md index 1957c63..700df13 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ details about why and how we built this. See the [live demo](http://twitter-fabric.github.io/velocity-react/). -**Latest version:** v1.2.1 updates babel from v5 to v6 +**Latest version:** v1.2.2 adds interruptBehavior for implicit animations *Note: v1.1.0 and later require React 0.14.* @@ -93,6 +93,13 @@ return to after animating away. A special value of "children" will use the direct children of the node, since there isn't a great way to specify that to `querySelectorAll`. +`interruptBehavior`: Specifies what should happen to an in-progress animation if the `animation` + property changes. By default is `stop`, which stops it at its current position, letting the new + animation use that as a starting point. This generally gives the smoothest results. Other options + are `finish`, which jumps the animation to its end state, and `queue`, which will proceed with + the new animation only after the old one has finished. These options may be necessary to avoid + bad behavior when certain built-in effects like "slideUp" and "slideDown" are toggled rapidly. + Unrecognized properties are passed as options to Velocity (e.g. `duration`, `delay`, `loop`). #### Methods @@ -139,7 +146,7 @@ are prerequisites for correct animation. The style value is applied using Veloci routines, which may differ from React's. Any hash entries beyond `animation` and `style` are passed in an options hash to Velocity. Use this -for options like `stagger`, `reverse`, *&tc.* +for options like `stagger`, `reverse`, *&c.* #### Statics diff --git a/package.json b/package.json index cf2ec01..e594b1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "velocity-react", - "version": "1.2.1", + "version": "1.2.2", "description": "React components to wrap Velocity animations", "main": "index.js", "scripts": {