react-smooth
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -0,1 +1,5 @@ | ||
### 0.0.11 / 2016-03-01 | ||
=== | ||
- fix: fix haven't unsubscribe handleStyleChange | ||
### 0.0.10 / 2016-02-17 | ||
@@ -2,0 +6,0 @@ === |
import Animate, { configSpring, configBezier } from 'react-smooth'; | ||
import React, { Component } from 'react'; | ||
import ReactDom from 'react-dom'; | ||
import raf from 'raf'; | ||
@@ -8,2 +9,3 @@ class Simple extends Component { | ||
to: 100, | ||
dots: [], | ||
}; | ||
@@ -17,2 +19,13 @@ | ||
componentDidMount() { | ||
raf(::this.update); | ||
} | ||
update(time) { | ||
if (!this.initTime) { | ||
this.initTime = time; | ||
this.setState({dots: }) | ||
} | ||
} | ||
render() { | ||
@@ -35,2 +48,4 @@ return ( | ||
</Animate> | ||
<div className="graph"> | ||
</div> | ||
</div> | ||
@@ -37,0 +52,0 @@ ); |
@@ -143,2 +143,6 @@ 'use strict'; | ||
value: function componentWillUnmount() { | ||
if (this.unSubscribe) { | ||
this.unSubscribe(); | ||
} | ||
if (this.manager) { | ||
@@ -248,4 +252,5 @@ this.manager.stop(); | ||
var manager = this.manager; | ||
manager.subscribe(this.handleStyleChange.bind(this)); | ||
this.unSubscribe = manager.subscribe(this.handleStyleChange.bind(this)); | ||
if (typeof easing === 'function' || typeof children === 'function' || easing === 'spring') { | ||
@@ -252,0 +257,0 @@ this.runJSAnimation(props); |
@@ -27,2 +27,8 @@ 'use strict'; | ||
handleChange = listener; | ||
return function () { | ||
handleChange = function handleChange() { | ||
return null; | ||
}; | ||
}; | ||
}, | ||
@@ -29,0 +35,0 @@ setStyle: function setStyle(style) { |
@@ -16,3 +16,3 @@ 'use strict'; | ||
var ACCURACY = 1e-3; | ||
var ACCURACY = 1e-4; | ||
@@ -19,0 +19,0 @@ var _cubicBezier = function _cubicBezier(c1, c2) { |
@@ -143,2 +143,6 @@ 'use strict'; | ||
value: function componentWillUnmount() { | ||
if (this.unSubscribe) { | ||
this.unSubscribe(); | ||
} | ||
if (this.manager) { | ||
@@ -248,4 +252,5 @@ this.manager.stop(); | ||
var manager = this.manager; | ||
manager.subscribe(this.handleStyleChange.bind(this)); | ||
this.unSubscribe = manager.subscribe(this.handleStyleChange.bind(this)); | ||
if (typeof easing === 'function' || typeof children === 'function' || easing === 'spring') { | ||
@@ -252,0 +257,0 @@ this.runJSAnimation(props); |
@@ -27,2 +27,8 @@ 'use strict'; | ||
handleChange = listener; | ||
return function () { | ||
handleChange = function handleChange() { | ||
return null; | ||
}; | ||
}; | ||
}, | ||
@@ -29,0 +35,0 @@ setStyle: function setStyle(style) { |
@@ -16,3 +16,3 @@ 'use strict'; | ||
var ACCURACY = 1e-3; | ||
var ACCURACY = 1e-4; | ||
@@ -19,0 +19,0 @@ var _cubicBezier = function _cubicBezier(c1, c2) { |
{ | ||
"name": "react-smooth", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "react animation library", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
@@ -120,2 +120,6 @@ import React, { Component, PropTypes, cloneElement, Children } from 'react'; | ||
componentWillUnmount() { | ||
if (this.unSubscribe) { | ||
this.unSubscribe(); | ||
} | ||
if (this.manager) { | ||
@@ -223,3 +227,4 @@ this.manager.stop(); | ||
const manager = this.manager; | ||
manager.subscribe(::this.handleStyleChange); | ||
this.unSubscribe = manager.subscribe(::this.handleStyleChange); | ||
@@ -226,0 +231,0 @@ if (typeof easing === 'function' || typeof children === 'function' || easing === 'spring') { |
@@ -12,2 +12,6 @@ import { translateStyle, compose } from './util'; | ||
handleChange = listener; | ||
return () => { | ||
handleChange = () => null; | ||
}; | ||
}, | ||
@@ -14,0 +18,0 @@ setStyle: (style) => { |
import invariant from 'invariant'; | ||
const ACCURACY = 1e-3; | ||
const ACCURACY = 1e-4; | ||
@@ -5,0 +5,0 @@ const _cubicBezier = (c1, c2) => { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
252388
6836
0